提交 1cc287dd 编写于 作者: M Marc Zyngier 提交者: Christoffer Dall

ARM: KVM: abstract fault decoding away

Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
上级 4926d445
......@@ -147,4 +147,9 @@ static inline u8 kvm_vcpu_trap_get_class(struct kvm_vcpu *vcpu)
return kvm_vcpu_get_hsr(vcpu) >> HSR_EC_SHIFT;
}
static inline u8 kvm_vcpu_trap_get_fault(struct kvm_vcpu *vcpu)
{
return kvm_vcpu_get_hsr(vcpu) & HSR_FSC_TYPE;
}
#endif /* __ARM_KVM_EMULATE_H__ */
......@@ -601,7 +601,7 @@ int kvm_handle_guest_abort(struct kvm_vcpu *vcpu, struct kvm_run *run)
kvm_vcpu_get_hfar(vcpu), fault_ipa);
/* Check the stage-2 fault is trans. fault or write fault */
fault_status = (kvm_vcpu_get_hsr(vcpu) & HSR_FSC_TYPE);
fault_status = kvm_vcpu_trap_get_fault(vcpu);
if (fault_status != FSC_FAULT && fault_status != FSC_PERM) {
kvm_err("Unsupported fault status: EC=%#lx DFCS=%#lx\n",
hsr_ec, fault_status);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册