summaryrefslogtreecommitdiff
path: root/arch/arm64/kvm/emulate.c
diff options
context:
space:
mode:
authorMark Rutland <mark.rutland@arm.com>2014-11-24 13:59:30 (GMT)
committerMark Rutland <mark.rutland@arm.com>2015-01-15 12:24:25 (GMT)
commitc6d01a947a51193e839516165286bc8d14a0e409 (patch)
treeda329869e3bd4187a6ebfc4f80ef0efd31629c07 /arch/arm64/kvm/emulate.c
parent60a1f02c9e91e0796b54e83b14fb8a07f7a568b6 (diff)
downloadlinux-c6d01a947a51193e839516165286bc8d14a0e409.tar.xz
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 124418d..f87d8fb 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;
}