]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
KVM: arm64: nv: Forward FEAT_XNX permissions to the shadow stage-2
authorOliver Upton <oupton@kernel.org>
Mon, 24 Nov 2025 19:01:45 +0000 (11:01 -0800)
committerOliver Upton <oupton@kernel.org>
Mon, 24 Nov 2025 22:24:45 +0000 (14:24 -0800)
commitd93febe2ed2e0491af9d47f0ee6d4b01918877f4
treea201382e9f23e1430bcf53af27134b380ad2f883
parent2608563b466b9192a9356b18463005da6e138bf9
KVM: arm64: nv: Forward FEAT_XNX permissions to the shadow stage-2

Add support for FEAT_XNX to shadow stage-2 MMUs, being careful to only
evaluate XN[0] when the feature is actually exposed to the VM.
Restructure the layering of permissions in the fault handler to assume
pX and uX then restricting based on the guest's stage-2 afterwards.

Reviewed-by: Marc Zyngier <maz@kernel.org>
Tested-by: Marc Zyngier <maz@kernel.org>
Link: https://msgid.link/20251124190158.177318-4-oupton@kernel.org
Signed-off-by: Oliver Upton <oupton@kernel.org>
arch/arm64/include/asm/kvm_nested.h
arch/arm64/kvm/mmu.c
arch/arm64/kvm/nested.c