[PATCH 0/2] KVM: arm64: pKVM fixes
Alexandru Elisei
alexandru.elisei at arm.com
Wed Dec 10 05:21:00 PST 2025
Similar to [1], when trying to run an unprotected VM on FVP with S1PIE enabled
and kvm-arm.mode=protected, writes to PIRE0_EL1 made by the guest in
__cpu_setup() are trapped by KVM and the BUG_ON(!r->access) is hit. That's
because HFGWTR_EL2.nPIRE0_EL1 is an inverse polarity trap and the FGT values for
the unprotected pKVM VCPU weren't being propagated from kvm_arch_vcpu_load().
Couldn't figure out how to run a protected pKVM VM, so that's untested.
Patch #2 is just a minor fixup for something I found by code inspection when I
trying to figure out how unprotected pKVM works.
[1] https://lore.kernel.org/all/20251112102853.47759-1-alexandru.elisei@arm.com/
Alexandru Elisei (2):
KVM: arm64: Copy FGT traps to unprotected pKVM VCPU on VCPU load
KVM: arm64: Remove extra argument for
__pvkm_host_{share,unshare}_hyp()
arch/arm64/kvm/hyp/nvhe/hyp-main.c | 12 ++++++++++--
arch/arm64/kvm/hyp/nvhe/pkvm.c | 1 -
arch/arm64/kvm/mmu.c | 2 +-
3 files changed, 11 insertions(+), 4 deletions(-)
base-commit: 7d0a66e4bb9081d75c82ec4957c50034cb0ea449
--
2.52.0
More information about the linux-arm-kernel
mailing list