]> git.ipfire.org Git - thirdparty/linux.git/commit
KVM: arm64: Initialise hyp_nr_cpus for nVHE hyp
authorVincent Donnefort <vdonnefort@google.com>
Mon, 9 Mar 2026 16:25:07 +0000 (16:25 +0000)
committerMarc Zyngier <maz@kernel.org>
Wed, 11 Mar 2026 08:51:16 +0000 (08:51 +0000)
commit8bbeb4d1698fb0945107c69019c15207bbe605c9
tree5429c774e9cd5762f108f5ba5777166e61b0aef9
parent405df5b55748d93d44666fd6005c60981094a077
KVM: arm64: Initialise hyp_nr_cpus for nVHE hyp

Knowing the number of CPUs is necessary for determining the boundaries
of per-cpu variables, which will be used for upcoming hypervisor
tracing. hyp_nr_cpus which stores this value, is only initialised for
the pKVM hypervisor. Make it accessible for the nVHE hypervisor as well.

With the kernel now responsible for initialising hyp_nr_cpus, the
nr_cpus parameter is no longer needed in __pkvm_init.

Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
Link: https://patch.msgid.link/20260309162516.2623589-22-vdonnefort@google.com
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/include/asm/kvm_hyp.h
arch/arm64/kvm/arm.c
arch/arm64/kvm/hyp/include/nvhe/mem_protect.h
arch/arm64/kvm/hyp/nvhe/hyp-main.c
arch/arm64/kvm/hyp/nvhe/setup.c