mirror of
https://github.com/torvalds/linux.git
synced 2024-12-18 00:53:40 +00:00
ARM: KVM: abstract HSR_WNR away
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Christoffer Dall <cdall@cs.columbia.edu>
This commit is contained in:
parent
4a1df28ac0
commit
023cc96406
@ -95,4 +95,9 @@ static inline bool kvm_vcpu_dabt_isvalid(struct kvm_vcpu *vcpu)
|
|||||||
return kvm_vcpu_get_hsr(vcpu) & HSR_ISV;
|
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__ */
|
#endif /* __ARM_KVM_EMULATE_H__ */
|
||||||
|
@ -92,7 +92,7 @@ static int decode_hsr(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa,
|
|||||||
return -EFAULT;
|
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;
|
sign_extend = kvm_vcpu_get_hsr(vcpu) & HSR_SSE;
|
||||||
rt = (kvm_vcpu_get_hsr(vcpu) & HSR_SRT_MASK) >> HSR_SRT_SHIFT;
|
rt = (kvm_vcpu_get_hsr(vcpu) & HSR_SRT_MASK) >> HSR_SRT_SHIFT;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user