]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: arm64: Compute per-vCPU FGTs at vcpu_load()
authorOliver Upton <oliver.upton@linux.dev>
Wed, 24 Sep 2025 23:51:49 +0000 (16:51 -0700)
committerMarc Zyngier <maz@kernel.org>
Mon, 13 Oct 2025 13:44:37 +0000 (14:44 +0100)
commitfb10ddf35c1cc3b2888a944c0a3b1aa3baea585e
treef1f4f382bf8faf8bef6d8a68bc025da0bea39074
parent5c7cf1e44e94a5408b1b5277810502b0f82b77fe
KVM: arm64: Compute per-vCPU FGTs at vcpu_load()

To date KVM has used the fine-grained traps for the sake of UNDEF
enforcement (so-called FGUs), meaning the constituent parts could be
computed on a per-VM basis and folded into the effective value when
programmed.

Prepare for traps changing based on the vCPU context by computing the
whole mess of them at vcpu_load(). Aggressively inline all the helpers
to preserve the build-time checks that were there before.

Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Reviewed-by: Joey Gouly <joey.gouly@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/include/asm/kvm_host.h
arch/arm64/kvm/arm.c
arch/arm64/kvm/config.c
arch/arm64/kvm/hyp/include/hyp/switch.h
arch/arm64/kvm/hyp/nvhe/pkvm.c