Skip to content

Commit 84b951a

Browse files
willdeaconMarc Zyngier
authored andcommitted
KVM: arm64: Handle data and instruction external aborts the same way
If the guest generates a synchronous external abort which is not handled by the host, we inject it back into the guest as a virtual SError, but only if the original fault was reported on the data side. Instruction faults are reported as "Unsupported FSC", causing the vCPU run loop to bail with -EFAULT. Although synchronous external aborts from a guest are pretty unusual, treat them the same regardless of whether they are taken as data or instruction aborts by EL2. Signed-off-by: Will Deacon <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Cc: Marc Zyngier <[email protected]> Cc: Quentin Perret <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent c9a636f commit 84b951a

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

arch/arm64/kvm/mmu.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2079,13 +2079,10 @@ int kvm_handle_guest_abort(struct kvm_vcpu *vcpu, struct kvm_run *run)
20792079
* For RAS the host kernel may handle this abort.
20802080
* There is no need to pass the error into the guest.
20812081
*/
2082-
if (!kvm_handle_guest_sea(fault_ipa, kvm_vcpu_get_esr(vcpu)))
2083-
return 1;
2084-
2085-
if (unlikely(!is_iabt)) {
2082+
if (kvm_handle_guest_sea(fault_ipa, kvm_vcpu_get_esr(vcpu)))
20862083
kvm_inject_vabt(vcpu);
2087-
return 1;
2088-
}
2084+
2085+
return 1;
20892086
}
20902087

20912088
trace_kvm_guest_fault(*vcpu_pc(vcpu), kvm_vcpu_get_esr(vcpu),

0 commit comments

Comments
 (0)