kvm: arm64: Fix EC field in inject_abt64
authorMatt Evans <matt.evans@arm.com>
Mon, 16 May 2016 12:54:56 +0000 (13:54 +0100)
committerChristoffer Dall <christoffer.dall@linaro.org>
Fri, 20 May 2016 13:39:36 +0000 (15:39 +0200)
The EC field of the constructed ESR is conditionally modified by ORing in
ESR_ELx_EC_DABT_LOW for a data abort.  However, ESR_ELx_EC_SHIFT is missing
from this condition.

Signed-off-by: Matt Evans <matt.evans@arm.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
arch/arm64/kvm/inject_fault.c

index 4d1ac81870d27e6f272abde088e0f5e8290c80d1..e9e0e6db73f6bdad6fbe77b7dda51ba04bf6734b 100644 (file)
@@ -162,7 +162,7 @@ static void inject_abt64(struct kvm_vcpu *vcpu, bool is_iabt, unsigned long addr
                esr |= (ESR_ELx_EC_IABT_CUR << ESR_ELx_EC_SHIFT);
 
        if (!is_iabt)
-               esr |= ESR_ELx_EC_DABT_LOW;
+               esr |= ESR_ELx_EC_DABT_LOW << ESR_ELx_EC_SHIFT;
 
        vcpu_sys_reg(vcpu, ESR_EL1) = esr | ESR_ELx_FSC_EXTABT;
 }