[PATCH v2 00/16] KVM: arm64: Add EL2 support to FEAT_S1PIE
Marc Zyngier
maz at kernel.org
Tue Sep 3 08:38:18 PDT 2024
This series serves a few purposes:
- Complete the S1PIE support to include EL2
- Sneak in the EL2 system register world switch
As mentioned in few of the patches, this implementation relies on a
very recent fix to the architecture (D22677 in [0]).
This series has seen a few changes since the initial posting [1]:
- Rebased on top of the AT support branch, which is currently sitting
in kvmarm/next
- Add handling for S1 indirect permission in AT, which I'm sure will
give Alexandru another king-sized headache
- Picked Mark Brown's series [2] dealing with TCRX and S1PIE
visibility, and slapped an extra fix on top for good measure
- Picked up RBs from Joey, with thanks.
[0] https://developer.arm.com/documentation/102105/ka-04/
[1] https://lore.kernel.org/r/20240813144738.2048302-1-maz@kernel.org
[2] https://lore.kernel.org/r/20240822-kvm-arm64-hide-pie-regs-v2-0-376624fa829c@kernel.org
Marc Zyngier (13):
KVM: arm64: nv: Handle CNTHCTL_EL2 specially
KVM: arm64: nv: Save/Restore vEL2 sysregs
KVM: arm64: Add TCR2_EL2 to the sysreg arrays
KVM: arm64: Add save/restore for TCR2_EL2
arm64: Add encoding for PIRE0_EL2
arm64: Remove VNCR definition for PIRE0_EL2
KVM: arm64: Add PIR{,E0}_EL2 to the sysreg arrays
KVM: arm64: Add save/restore for PIR{,E0}_EL2
KVM: arm64: Handle PIR{,E0}_EL2 traps
KVM: arm64: Sanitise ID_AA64MMFR3_EL1
KVM: arm64: Split S1 permission evaluation into direct and
hierarchical parts
KVM: arm64: Implement AT S1PIE support
KVM: arm64: Rely on visibility to let PIR*_ELx/TCR2_ELx UNDEF
Mark Brown (3):
KVM: arm64: Define helper for EL2 registers with custom visibility
KVM: arm64: Hide TCR2_EL1 from userspace when disabled for guests
KVM: arm64: Hide S1PIE registers from userspace when disabled for
guests
arch/arm64/include/asm/kvm_host.h | 9 +
arch/arm64/include/asm/vncr_mapping.h | 1 -
arch/arm64/kvm/at.c | 296 ++++++++++++++++-----
arch/arm64/kvm/hyp/include/hyp/sysreg-sr.h | 5 +-
arch/arm64/kvm/hyp/nvhe/sysreg-sr.c | 2 +-
arch/arm64/kvm/hyp/vhe/sysreg-sr.c | 155 ++++++++++-
arch/arm64/kvm/sys_regs.c | 114 +++++++-
arch/arm64/tools/sysreg | 4 +
include/kvm/arm_arch_timer.h | 3 +
9 files changed, 505 insertions(+), 84 deletions(-)
--
2.39.2
More information about the linux-arm-kernel
mailing list