@@ -1787,6 +1787,20 @@ int kvm_handle_guest_abort(struct kvm_vcpu *vcpu)
return 1;
}
+ /*
+ * If instructions of FEAT_{LS64, LS64_V, LS64_ACCDATA} operated on
+ * unsupported memory regions, a DABT for unsupported Exclusive or
+ * atomic access is generated. It's implementation defined whether
+ * the exception will be taken to, a stage-1 DABT or the final enabled
+ * stage of translation (stage-2 in this case as we hit here). Inject
+ * a DABT to the guest to handle it if it's implemented as a stage-2
+ * DABT.
+ */
+ if (esr_fsc_is_excl_atomic_fault(esr)) {
+ kvm_inject_dabt(vcpu, kvm_vcpu_get_hfar(vcpu));
+ return 1;
+ }
+
trace_kvm_guest_fault(*vcpu_pc(vcpu), kvm_vcpu_get_esr(vcpu),
kvm_vcpu_get_hfar(vcpu), fault_ipa);