diff options
author | Marc Zyngier <maz@kernel.org> | 2024-04-19 13:29:33 +0300 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2024-04-20 14:42:51 +0300 |
commit | 213b3d1ea1612c6d26153be446923831c4534689 (patch) | |
tree | 6af4149811aabce00ff6164041efbffadd4d141a /arch/arm64/kvm/handle_exit.c | |
parent | 6ccc971ee2c61a1ffb487e46bf6184f7df6aacfb (diff) | |
download | linux-213b3d1ea1612c6d26153be446923831c4534689.tar.xz |
KVM: arm64: nv: Handle ERETA[AB] instructions
Now that we have some emulation in place for ERETA[AB], we can
plug it into the exception handling machinery.
As for a bare ERET, an "easy" ERETAx instruction is processed as
a fixup, while something that requires a translation regime
transition or an exception delivery is left to the slow path.
Reviewed-by: Joey Gouly <joey.gouly@arm.com>
Reviewed-by: Oliver Upton <oliver.upton@linux.dev>
Link: https://lore.kernel.org/r/20240419102935.1935571-14-maz@kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
Diffstat (limited to 'arch/arm64/kvm/handle_exit.c')
-rw-r--r-- | arch/arm64/kvm/handle_exit.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm64/kvm/handle_exit.c b/arch/arm64/kvm/handle_exit.c index 1ba2f788b2c3..407bdfbb572b 100644 --- a/arch/arm64/kvm/handle_exit.c +++ b/arch/arm64/kvm/handle_exit.c @@ -248,7 +248,8 @@ static int kvm_handle_ptrauth(struct kvm_vcpu *vcpu) static int kvm_handle_eret(struct kvm_vcpu *vcpu) { - if (esr_iss_is_eretax(kvm_vcpu_get_esr(vcpu))) + if (esr_iss_is_eretax(kvm_vcpu_get_esr(vcpu)) && + !vcpu_has_ptrauth(vcpu)) return kvm_handle_ptrauth(vcpu); /* |