mbox series

[0/4] KVM: arm64: nv: Add CPTR_EL2 handling

Message ID 20240604130553.199981-1-maz@kernel.org (mailing list archive)
Headers show
Series KVM: arm64: nv: Add CPTR_EL2 handling | expand

Message

Marc Zyngier June 4, 2024, 1:05 p.m. UTC
Building on top of Oliver's NV+SVE series[1], I've put together a
small set of patches handling CPTR_EL2, as the two are pretty closely
related.

This series adds:

- the description on the CPTR_EL2-driven traps in the exception
  routing tables

- the merging of the L1 guest's CPTR_EL2 traps with the host's

- the handling of L1's CPTR_EL2 access via the CPACR_EL1 accessor as a
  trap so that we can emulate writing to the TCPAC/TTA bits

Overall, this is pretty straightforward (for NV, that is...).

[1] https://lore.kernel.org/r/20240531231358.1000039-1-oliver.upton@linux.dev

Marc Zyngier (4):
  KVM: arm64: nv: Add TCPAC/TTA to CPTR->CPACR conversion helper
  KVM: arm64: nv: Add trap description for CPTR_EL2
  KVM: arm64: nv: Add additional trap setup for CPTR_EL2
  KVM: arm64: nv: Handle CPACR_EL1 traps

 arch/arm64/include/asm/kvm_emulate.h |  2 +-
 arch/arm64/include/asm/kvm_nested.h  |  4 +-
 arch/arm64/kvm/emulate-nested.c      | 91 ++++++++++++++++++++++++++++
 arch/arm64/kvm/hyp/vhe/switch.c      | 55 ++++++++++++++++-
 4 files changed, 148 insertions(+), 4 deletions(-)

Comments

Oliver Upton June 4, 2024, 6:49 p.m. UTC | #1
On Tue, Jun 04, 2024 at 02:05:49PM +0100, Marc Zyngier wrote:
> Building on top of Oliver's NV+SVE series[1], I've put together a
> small set of patches handling CPTR_EL2, as the two are pretty closely
> related.

Thanks for posting this, overall looks good. I'll probably pick this up
and repost a combined series that eliminates some of the incidental
churn that I've forced upon your patches.