summaryrefslogtreecommitdiffstats
path: root/arch/arm/include
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2012-09-18 14:09:58 +0100
committerChristoffer Dall <cdall@cs.columbia.edu>2013-03-06 15:48:43 -0800
commit4926d445eb76bec8ebd71f5ed9e9c94fd738014d (patch)
treeba608d6643fea298f0f7517a142a4cde78114056 /arch/arm/include
parent23b415d61a80c0c63f43dd2b3a08a1fa0b79b8ea (diff)
downloadblackbird-op-linux-4926d445eb76bec8ebd71f5ed9e9c94fd738014d.tar.gz
blackbird-op-linux-4926d445eb76bec8ebd71f5ed9e9c94fd738014d.zip
ARM: KVM: abstract exception class decoding away
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'arch/arm/include')
-rw-r--r--arch/arm/include/asm/kvm_emulate.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm/include/asm/kvm_emulate.h b/arch/arm/include/asm/kvm_emulate.h
index a9b853f35aed..539f83ac167f 100644
--- a/arch/arm/include/asm/kvm_emulate.h
+++ b/arch/arm/include/asm/kvm_emulate.h
@@ -142,4 +142,9 @@ static inline bool kvm_vcpu_trap_il_is32bit(struct kvm_vcpu *vcpu)
return kvm_vcpu_get_hsr(vcpu) & HSR_IL;
}
+static inline u8 kvm_vcpu_trap_get_class(struct kvm_vcpu *vcpu)
+{
+ return kvm_vcpu_get_hsr(vcpu) >> HSR_EC_SHIFT;
+}
+
#endif /* __ARM_KVM_EMULATE_H__ */
OpenPOWER on IntegriCloud