[PATCH 0/5] KVM: arm64: Fix handling of TCR2_EL1

Marc Zyngier
2024-06-25T13:00:49Z

As I'm inching towards supporting FEAT_S1PIE in a NV guest (oh, the
fun I'm having!), it has become obvious that we're missing the basics
when it comes to:

- VM configuration: HCRX_EL2.TCR2En is forced to 1, and we blindly
save/restore stuff.

- trap bit description and routing: none, obviously, since we make a
point in not trapping.

Given that these are prerequisites for the NV work and that we should
have had that from the beginning, I would like to plug them before
piling more patches on top.

Marc Zyngier (5):
KVM: arm64: Correctly honor the presence of FEAT_TCRX
KVM: arm64: Get rid of HCRX_GUEST_FLAGS
KVM: arm64: Make TCR2_EL1 save/restore dependent on the VM features
KVM: arm64: Make PIR{,E0}_EL1 save/restore conditional on FEAT_TCRX
KVM: arm64: Honor trap routing for TCR2_EL1

arch/arm64/include/asm/kvm_arm.h | 1 -
arch/arm64/kvm/emulate-nested.c | 13 ++++++++
arch/arm64/kvm/hyp/include/hyp/sysreg-sr.h | 35 +++++++++++++++-------
arch/arm64/kvm/sys_regs.c | 17 ++++++++++-
4 files changed, 54 insertions(+), 12 deletions(-)

--
2.39.2