From: Marc Zyngier Date: Tue, 18 Sep 2012 10:23:02 +0000 (+0100) Subject: ARM: KVM: abstract HSR_SSE away X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=7c511b881f79a2a390e7c2e9a39b9a881255e614;p=linux-beck.git ARM: KVM: abstract HSR_SSE away Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall --- diff --git a/arch/arm/include/asm/kvm_emulate.h b/arch/arm/include/asm/kvm_emulate.h index a0d76df470b0..cd9cb874a7ff 100644 --- a/arch/arm/include/asm/kvm_emulate.h +++ b/arch/arm/include/asm/kvm_emulate.h @@ -100,4 +100,9 @@ static inline bool kvm_vcpu_dabt_iswrite(struct kvm_vcpu *vcpu) return kvm_vcpu_get_hsr(vcpu) & HSR_WNR; } +static inline bool kvm_vcpu_dabt_issext(struct kvm_vcpu *vcpu) +{ + return kvm_vcpu_get_hsr(vcpu) & HSR_SSE; +} + #endif /* __ARM_KVM_EMULATE_H__ */ diff --git a/arch/arm/kvm/mmio.c b/arch/arm/kvm/mmio.c index 7d58cb5b8bde..058029c2d504 100644 --- a/arch/arm/kvm/mmio.c +++ b/arch/arm/kvm/mmio.c @@ -93,7 +93,7 @@ static int decode_hsr(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa, } is_write = kvm_vcpu_dabt_iswrite(vcpu); - sign_extend = kvm_vcpu_get_hsr(vcpu) & HSR_SSE; + sign_extend = kvm_vcpu_dabt_issext(vcpu); rt = (kvm_vcpu_get_hsr(vcpu) & HSR_SRT_MASK) >> HSR_SRT_SHIFT; if (kvm_vcpu_reg_is_pc(vcpu, rt)) {