ARM: KVM: abstract HSR_SSE away

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <cdall@cs.columbia.edu>
This commit is contained in:
Marc Zyngier 2012-09-18 11:23:02 +01:00 committed by Christoffer Dall
parent 023cc96406
commit 7c511b881f
2 changed files with 6 additions and 1 deletions

View File

@ -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__ */

View File

@ -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)) {