Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 023cc964 authored by Marc Zyngier's avatar Marc Zyngier Committed by Christoffer Dall
Browse files

ARM: KVM: abstract HSR_WNR away

parent 4a1df28a
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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__ */
+1 −1
Original line number Diff line number Diff line
@@ -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;