mbox series

[v2,0/3] KVM: arm64: Control visibility of S1PIE related sysregs to userspace

Message ID 20240822-kvm-arm64-hide-pie-regs-v2-0-376624fa829c@kernel.org (mailing list archive)
Headers show
Series KVM: arm64: Control visibility of S1PIE related sysregs to userspace | expand

Message

Mark Brown Aug. 21, 2024, 11:35 p.m. UTC
While looking at the KVM system register code I noticed that we do not
have visibility operations for TCR2 or the S1PIE registers, I may be
missing some reason why they are not required but in case I'm not I
figured the most direct way to ask was to propose adding the operations.

This is based on Marc Zyngier's series:

   https://lore.kernel.org/all/20240813144738.2048302-4-maz@kernel.org/

Signed-off-by: Mark Brown <broonie@kernel.org>
---
Changes in v2:
- Rebase on top of Marc's series adding EL2 S1PIE support.
- Handle EL2 versions of registers.
- Link to v1: https://lore.kernel.org/r/20240821-kvm-arm64-hide-pie-regs-v1-0-08cb3c79cb57@kernel.org

---
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 |  6 +++
 arch/arm64/kvm/sys_regs.c         | 77 ++++++++++++++++++++++++++++++++++-----
 2 files changed, 73 insertions(+), 10 deletions(-)
---
base-commit: 6998fa93fbbf237b518bf921f8c21e71514e5aed
change-id: 20240820-kvm-arm64-hide-pie-regs-2236f70703ab
prerequisite-message-id: 20240813144738.2048302-1-maz@kernel.org
prerequisite-patch-id: 7e65cb84e9a1ac67ec6174bc2c8e6f8a3cd7a2b8
prerequisite-patch-id: 0e79993ba049d517f676a461104379fa0c34f963
prerequisite-patch-id: 075ad9eb54d31d099a9e30ad914e29e927156ee9
prerequisite-patch-id: d61f24087c8e4c6c650969ed2db55681aa0a5562
prerequisite-patch-id: abb476d6ac155c9060656eb383e4f42cf3465c10
prerequisite-patch-id: f0cace2aabf2385d74514a3733ddbbdb1e6d575d
prerequisite-patch-id: 62ce04c9f054610b9a992a2c65d30c6cb0a0c23b
prerequisite-patch-id: efc96c4b2c999e86de8e8cbd2e5a66a3640ee187
prerequisite-patch-id: df53b3c1bc3339de587651f1f884f2bcad11a36f
prerequisite-patch-id: 58095341c1baa606c91dac8b2fc1446f5d5178de

Best regards,