]> www.infradead.org Git - nvme.git/commit
KVM: arm64: Add helpers for ESR_ELx_ERET_ISS_ERET*
authorMarc Zyngier <maz@kernel.org>
Fri, 19 Apr 2024 10:29:22 +0000 (11:29 +0100)
committerMarc Zyngier <maz@kernel.org>
Sat, 20 Apr 2024 11:42:50 +0000 (12:42 +0100)
commit80d8b55a57a18b0b1dac951ea28bfd657b14facc
tree90cc415833647ad91c28b10dc8e662b5c133cda7
parent1b06b99f25e0c957feb488ff8117a37f592c3866
KVM: arm64: Add helpers for ESR_ELx_ERET_ISS_ERET*

The ESR_ELx_ERET_ISS_ERET* macros are a bit confusing:

- ESR_ELx_ERET_ISS_ERET really indicates that we have trapped an
  ERETA* instruction, as opposed to an ERET

- ESR_ELx_ERET_ISS_ERETA really indicates that we have trapped
  an ERETAB instruction, as opposed to an ERETAA.

We could repaint those to make more sense, but these are the
names that are present in the ARM ARM, and we are sentimentally
attached to those.

Instead, add two new helpers:

- esr_iss_is_eretax() being true tells you that you need to
  authenticate the ERET

- esr_iss_is_eretab() tells you that you need to use the B key
  instead of the A key

Following patches will make use of these primitives.

Suggested-by: Joey Gouly <joey.gouly@arm.com>
Reviewed-by: Oliver Upton <oliver.upton@linux.dev>
Link: https://lore.kernel.org/r/20240419102935.1935571-3-maz@kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/include/asm/esr.h
arch/arm64/kvm/handle_exit.c