aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64/kvm/hyp/exception.c
diff options
context:
space:
mode:
authorOliver Upton <[email protected]>2025-07-08 17:25:22 +0000
committerOliver Upton <[email protected]>2025-07-08 18:36:35 +0000
commitfff97df2a0bd215979ae224b97e3e4075030a953 (patch)
tree966379ececd17d273506eeb50b6b395f3fcc2406 /arch/arm64/kvm/hyp/exception.c
parentKVM: arm64: nv: Ensure Address size faults affect correct ESR (diff)
downloadkernel-fff97df2a0bd215979ae224b97e3e4075030a953.tar.gz
kernel-fff97df2a0bd215979ae224b97e3e4075030a953.zip
KVM: arm64: Route SEAs to the SError vector when EASE is set
One of the finest additions of FEAT_DoubleFault2 is the ability for software to request *synchronous* external aborts be taken to the SError vector, which of coure are *asynchronous* in nature. Opinions be damned, implement the architecture and send SEAs to the SError vector if EASE is set for the target context. Reviewed-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Oliver Upton <[email protected]>
Diffstat (limited to 'arch/arm64/kvm/hyp/exception.c')
-rw-r--r--arch/arm64/kvm/hyp/exception.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/arm64/kvm/hyp/exception.c b/arch/arm64/kvm/hyp/exception.c
index 592adc78b149..7dafd10e52e8 100644
--- a/arch/arm64/kvm/hyp/exception.c
+++ b/arch/arm64/kvm/hyp/exception.c
@@ -339,6 +339,10 @@ static void kvm_inject_exception(struct kvm_vcpu *vcpu)
enter_exception64(vcpu, PSR_MODE_EL1h, except_type_sync);
break;
+ case unpack_vcpu_flag(EXCEPT_AA64_EL1_SERR):
+ enter_exception64(vcpu, PSR_MODE_EL1h, except_type_serror);
+ break;
+
case unpack_vcpu_flag(EXCEPT_AA64_EL2_SYNC):
enter_exception64(vcpu, PSR_MODE_EL2h, except_type_sync);
break;
@@ -353,7 +357,7 @@ static void kvm_inject_exception(struct kvm_vcpu *vcpu)
default:
/*
- * Only EL1_SYNC and EL2_{SYNC,IRQ,SERR} makes
+ * Only EL1_{SYNC,SERR} and EL2_{SYNC,IRQ,SERR} makes
* sense so far. Everything else gets silently
* ignored.
*/