summaryrefslogtreecommitdiffstats
path: root/arch/arm64/kvm/emulate.c
diff options
context:
space:
mode:
authorMark Rutland <mark.rutland@arm.com>2014-11-24 14:59:30 +0100
committerMark Rutland <mark.rutland@arm.com>2015-01-15 13:24:25 +0100
commitc6d01a947a51193e839516165286bc8d14a0e409 (patch)
treeda329869e3bd4187a6ebfc4f80ef0efd31629c07 /arch/arm64/kvm/emulate.c
parentarm64: decode ESR_ELx.EC when reporting exceptions (diff)
downloadlinux-c6d01a947a51193e839516165286bc8d14a0e409.tar.xz
linux-c6d01a947a51193e839516165286bc8d14a0e409.zip
arm64: kvm: move to ESR_ELx macros
Now that we have common ESR_ELx macros, make use of them in the arm64 KVM code. The addition of <asm/esr.h> to the include path highlighted badly ordered (i.e. not alphabetical) include lists; these are changed to alphabetical order. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland <mark.rutland@arm.com> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Marc Zyngier <marc.zyngier@arm.com> Cc: Peter Maydell <peter.maydell@linaro.org> Cc: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/kvm/emulate.c')
-rw-r--r--arch/arm64/kvm/emulate.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm64/kvm/emulate.c b/arch/arm64/kvm/emulate.c
index 124418d17049..f87d8fbaa48d 100644
--- a/arch/arm64/kvm/emulate.c
+++ b/arch/arm64/kvm/emulate.c
@@ -22,6 +22,7 @@
*/
#include <linux/kvm_host.h>
+#include <asm/esr.h>
#include <asm/kvm_emulate.h>
/*
@@ -55,8 +56,8 @@ static int kvm_vcpu_get_condition(const struct kvm_vcpu *vcpu)
{
u32 esr = kvm_vcpu_get_hsr(vcpu);
- if (esr & ESR_EL2_CV)
- return (esr & ESR_EL2_COND) >> ESR_EL2_COND_SHIFT;
+ if (esr & ESR_ELx_CV)
+ return (esr & ESR_ELx_COND_MASK) >> ESR_ELx_COND_SHIFT;
return -1;
}