diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2016-09-06 09:02:11 -0400 |
---|---|---|
committer | Christoffer Dall <christoffer.dall@linaro.org> | 2016-09-08 06:53:00 -0400 |
commit | 435bca5fe913e2e5f96881a77ab20e653f5ad894 (patch) | |
tree | 68ce7bff312373d043d7cb32ad83848a0e5db641 | |
parent | cc325cfc37b5b9e8814d7172e3a6e47d3b098ff1 (diff) |
arm: KVM: Allow an exit code to be tagged with a Virtual Abort
An asynchronous abort can also be triggered whilst running at EL2.
But instead of making that a new error code, we need to communicate
it to the rest of KVM together with the exit reason.
So let's hijack a single bit that allows the exception code to be
tagged with a "pending Abort" information.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
-rw-r--r-- | arch/arm/include/asm/kvm_asm.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/include/asm/kvm_asm.h b/arch/arm/include/asm/kvm_asm.h index 58faff5f1eb2..05e47faf96a1 100644 --- a/arch/arm/include/asm/kvm_asm.h +++ b/arch/arm/include/asm/kvm_asm.h | |||
@@ -21,6 +21,10 @@ | |||
21 | 21 | ||
22 | #include <asm/virt.h> | 22 | #include <asm/virt.h> |
23 | 23 | ||
24 | #define ARM_EXIT_WITH_ABORT_BIT 31 | ||
25 | #define ARM_EXCEPTION_CODE(x) ((x) & ~(1U << ARM_EXIT_WITH_ABORT_BIT)) | ||
26 | #define ARM_ABORT_PENDING(x) !!((x) & (1U << ARM_EXIT_WITH_ABORT_BIT)) | ||
27 | |||
24 | #define ARM_EXCEPTION_RESET 0 | 28 | #define ARM_EXCEPTION_RESET 0 |
25 | #define ARM_EXCEPTION_UNDEFINED 1 | 29 | #define ARM_EXCEPTION_UNDEFINED 1 |
26 | #define ARM_EXCEPTION_SOFTWARE 2 | 30 | #define ARM_EXCEPTION_SOFTWARE 2 |