|
@@ -239,11 +239,12 @@ static bool __hyp_text __translate_far_to_hpfar(u64 far, u64 *hpfar)
|
|
|
|
|
|
static bool __hyp_text __populate_fault_info(struct kvm_vcpu *vcpu)
|
|
static bool __hyp_text __populate_fault_info(struct kvm_vcpu *vcpu)
|
|
{
|
|
{
|
|
- u64 esr = read_sysreg_el2(esr);
|
|
|
|
- u8 ec = ESR_ELx_EC(esr);
|
|
|
|
|
|
+ u8 ec;
|
|
|
|
+ u64 esr;
|
|
u64 hpfar, far;
|
|
u64 hpfar, far;
|
|
|
|
|
|
- vcpu->arch.fault.esr_el2 = esr;
|
|
|
|
|
|
+ esr = vcpu->arch.fault.esr_el2;
|
|
|
|
+ ec = ESR_ELx_EC(esr);
|
|
|
|
|
|
if (ec != ESR_ELx_EC_DABT_LOW && ec != ESR_ELx_EC_IABT_LOW)
|
|
if (ec != ESR_ELx_EC_DABT_LOW && ec != ESR_ELx_EC_IABT_LOW)
|
|
return true;
|
|
return true;
|
|
@@ -336,6 +337,8 @@ again:
|
|
exit_code = __guest_enter(vcpu, host_ctxt);
|
|
exit_code = __guest_enter(vcpu, host_ctxt);
|
|
/* And we're baaack! */
|
|
/* And we're baaack! */
|
|
|
|
|
|
|
|
+ if (ARM_EXCEPTION_CODE(exit_code) != ARM_EXCEPTION_IRQ)
|
|
|
|
+ vcpu->arch.fault.esr_el2 = read_sysreg_el2(esr);
|
|
/*
|
|
/*
|
|
* We're using the raw exception code in order to only process
|
|
* We're using the raw exception code in order to only process
|
|
* the trap if no SError is pending. We will come back to the
|
|
* the trap if no SError is pending. We will come back to the
|