summaryrefslogtreecommitdiffstats
path: root/arch/arm64/include/asm/kvm_asm.h
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2018-12-19 09:28:38 +0100
committerMarc Zyngier <marc.zyngier@arm.com>2018-12-19 18:47:53 +0100
commit58466766cd35754a061414c0c93225db2962948e (patch)
treec39cdb2d9932603bfe0f704f9a1db7c6536dc103 /arch/arm64/include/asm/kvm_asm.h
parentarm64: KVM: Avoid setting the upper 32 bits of VTCR_EL2 to 1 (diff)
downloadlinux-58466766cd35754a061414c0c93225db2962948e.tar.xz
linux-58466766cd35754a061414c0c93225db2962948e.zip
arm/arm64: KVM: Add ARM_EXCEPTION_IS_TRAP macro
32 and 64bit use different symbols to identify the traps. 32bit has a fine grained approach (prefetch abort, data abort and HVC), while 64bit is pretty happy with just "trap". This has been fine so far, except that we now need to decode some of that in tracepoints that are common to both architectures. Introduce ARM_EXCEPTION_IS_TRAP which abstracts the trap symbols and make the tracepoint use it. Acked-by: Christoffer Dall <christoffer.dall@arm.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'arch/arm64/include/asm/kvm_asm.h')
-rw-r--r--arch/arm64/include/asm/kvm_asm.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/kvm_asm.h b/arch/arm64/include/asm/kvm_asm.h
index b2e12c99db7d..f5b79e995f40 100644
--- a/arch/arm64/include/asm/kvm_asm.h
+++ b/arch/arm64/include/asm/kvm_asm.h
@@ -25,6 +25,7 @@
#define ARM_EXIT_WITH_SERROR_BIT 31
#define ARM_EXCEPTION_CODE(x) ((x) & ~(1U << ARM_EXIT_WITH_SERROR_BIT))
+#define ARM_EXCEPTION_IS_TRAP(x) (ARM_EXCEPTION_CODE((x)) == ARM_EXCEPTION_TRAP)
#define ARM_SERROR_PENDING(x) !!((x) & (1U << ARM_EXIT_WITH_SERROR_BIT))
#define ARM_EXCEPTION_IRQ 0