]> git.ipfire.org Git - thirdparty/linux.git/commit
KVM: arm64: nv: Apply guest's MDCR traps in nested context
authorOliver Upton <oliver.upton@linux.dev>
Wed, 17 Sep 2025 20:31:25 +0000 (13:31 -0700)
committerMarc Zyngier <maz@kernel.org>
Thu, 18 Sep 2025 15:46:20 +0000 (16:46 +0100)
commit3af1105c4fa362d17d577b55d2b8a7c4609f16fc
treece8e9148d1e9fa0e7a342d422f41c6b7164877f8
parent4a684088421d5a1ffb3b13243c58a9078c99e4b9
KVM: arm64: nv: Apply guest's MDCR traps in nested context

KVM needs to ensure the guest hypervisor's traps take effect when the
vCPU is in a nested context. While supporting infrastructure is in place
for most of the EL2 trap registers, MDCR_EL2 is not.

Fold the guest's trap configuration into the effective MDCR_EL2. Apply
it directly to the in-memory representation as it gets recomputed on
every vcpu_load() anyway.

Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/nested.c