summaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/kvm_emulate.h
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2012-09-18 11:28:57 +0100
committerChristoffer Dall <cdall@cs.columbia.edu>2013-03-06 15:48:42 -0800
commitd0adf747c9caa8b01d0c1f987e306b7c6aaa5a04 (patch)
tree998cdabaae89710993b1933a46d83005733702c7 /arch/arm/include/asm/kvm_emulate.h
parent7c511b881f79a2a390e7c2e9a39b9a881255e614 (diff)
ARM: KVM: abstract HSR_SRT_{MASK,SHIFT} away
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'arch/arm/include/asm/kvm_emulate.h')
-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 cd9cb874a7f..d548078af4d 100644
--- a/arch/arm/include/asm/kvm_emulate.h
+++ b/arch/arm/include/asm/kvm_emulate.h
@@ -105,4 +105,9 @@ static inline bool kvm_vcpu_dabt_issext(struct kvm_vcpu *vcpu)
return kvm_vcpu_get_hsr(vcpu) & HSR_SSE;
}
+static inline int kvm_vcpu_dabt_get_rd(struct kvm_vcpu *vcpu)
+{
+ return (kvm_vcpu_get_hsr(vcpu) & HSR_SRT_MASK) >> HSR_SRT_SHIFT;
+}
+
#endif /* __ARM_KVM_EMULATE_H__ */