1
0
Fork 0

ARM: KVM: abstract HSR_WNR away

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <cdall@cs.columbia.edu>
hifive-unleashed-5.1
Marc Zyngier 2012-09-18 11:12:26 +01:00 committed by Christoffer Dall
parent 4a1df28ac0
commit 023cc96406
2 changed files with 6 additions and 1 deletions

View File

@ -95,4 +95,9 @@ static inline bool kvm_vcpu_dabt_isvalid(struct kvm_vcpu *vcpu)
return kvm_vcpu_get_hsr(vcpu) & HSR_ISV;
}
static inline bool kvm_vcpu_dabt_iswrite(struct kvm_vcpu *vcpu)
{
return kvm_vcpu_get_hsr(vcpu) & HSR_WNR;
}
#endif /* __ARM_KVM_EMULATE_H__ */

View File

@ -92,7 +92,7 @@ static int decode_hsr(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa,
return -EFAULT;
}
is_write = kvm_vcpu_get_hsr(vcpu) & HSR_WNR;
is_write = kvm_vcpu_dabt_iswrite(vcpu);
sign_extend = kvm_vcpu_get_hsr(vcpu) & HSR_SSE;
rt = (kvm_vcpu_get_hsr(vcpu) & HSR_SRT_MASK) >> HSR_SRT_SHIFT;