diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2016-09-06 16:02:15 +0300 |
---|---|---|
committer | Christoffer Dall <christoffer.dall@linaro.org> | 2016-09-08 13:53:00 +0300 |
commit | 4055710baca8cb067b059a635cf851eb86410a83 (patch) | |
tree | 3dc5d0ab2b508ae876d4f350d070433623cfe826 /arch/arm/kvm/mmu.c | |
parent | e656a1f91e701e6a1eddf8c029b45639b60877d5 (diff) | |
download | linux-4055710baca8cb067b059a635cf851eb86410a83.tar.xz |
arm/arm64: KVM: Inject virtual abort when guest exits on external abort
If we spot a data abort bearing the ESR_EL2.EA bit set, we know that
this is an external abort, and that should be punished by the injection
of an abort.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Diffstat (limited to 'arch/arm/kvm/mmu.c')
-rw-r--r-- | arch/arm/kvm/mmu.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm/kvm/mmu.c b/arch/arm/kvm/mmu.c index 344755dcc3b2..60e0c1ac86e8 100644 --- a/arch/arm/kvm/mmu.c +++ b/arch/arm/kvm/mmu.c @@ -1432,6 +1432,11 @@ int kvm_handle_guest_abort(struct kvm_vcpu *vcpu, struct kvm_run *run) int ret, idx; is_iabt = kvm_vcpu_trap_is_iabt(vcpu); + if (unlikely(!is_iabt && kvm_vcpu_dabt_isextabt(vcpu))) { + kvm_inject_vabt(vcpu); + return 1; + } + fault_ipa = kvm_vcpu_get_fault_ipa(vcpu); trace_kvm_guest_fault(*vcpu_pc(vcpu), kvm_vcpu_get_hsr(vcpu), |