diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2012-10-15 05:33:38 -0400 |
---|---|---|
committer | Christoffer Dall <cdall@cs.columbia.edu> | 2013-03-06 18:48:43 -0500 |
commit | 52d1dba933f601d8d9e6373377377b12d6bcfac0 (patch) | |
tree | 1b3a5ee31d54def99b548cc395fd641d3c9704c3 /arch/arm/kvm/mmu.c | |
parent | 1cc287dd081235e02cebd791f1e930ca6f422dcd (diff) |
ARM: KVM: abstract HSR_EC_IABT away
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'arch/arm/kvm/mmu.c')
-rw-r--r-- | arch/arm/kvm/mmu.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/arch/arm/kvm/mmu.c b/arch/arm/kvm/mmu.c index e00f28d2670c..8e9047a4b3b7 100644 --- a/arch/arm/kvm/mmu.c +++ b/arch/arm/kvm/mmu.c | |||
@@ -585,7 +585,6 @@ out_unlock: | |||
585 | */ | 585 | */ |
586 | int kvm_handle_guest_abort(struct kvm_vcpu *vcpu, struct kvm_run *run) | 586 | int kvm_handle_guest_abort(struct kvm_vcpu *vcpu, struct kvm_run *run) |
587 | { | 587 | { |
588 | unsigned long hsr_ec; | ||
589 | unsigned long fault_status; | 588 | unsigned long fault_status; |
590 | phys_addr_t fault_ipa; | 589 | phys_addr_t fault_ipa; |
591 | struct kvm_memory_slot *memslot; | 590 | struct kvm_memory_slot *memslot; |
@@ -593,8 +592,7 @@ int kvm_handle_guest_abort(struct kvm_vcpu *vcpu, struct kvm_run *run) | |||
593 | gfn_t gfn; | 592 | gfn_t gfn; |
594 | int ret, idx; | 593 | int ret, idx; |
595 | 594 | ||
596 | hsr_ec = kvm_vcpu_trap_get_class(vcpu); | 595 | is_iabt = kvm_vcpu_trap_is_iabt(vcpu); |
597 | is_iabt = (hsr_ec == HSR_EC_IABT); | ||
598 | fault_ipa = kvm_vcpu_get_fault_ipa(vcpu); | 596 | fault_ipa = kvm_vcpu_get_fault_ipa(vcpu); |
599 | 597 | ||
600 | trace_kvm_guest_fault(*vcpu_pc(vcpu), kvm_vcpu_get_hsr(vcpu), | 598 | trace_kvm_guest_fault(*vcpu_pc(vcpu), kvm_vcpu_get_hsr(vcpu), |
@@ -603,8 +601,8 @@ int kvm_handle_guest_abort(struct kvm_vcpu *vcpu, struct kvm_run *run) | |||
603 | /* Check the stage-2 fault is trans. fault or write fault */ | 601 | /* Check the stage-2 fault is trans. fault or write fault */ |
604 | fault_status = kvm_vcpu_trap_get_fault(vcpu); | 602 | fault_status = kvm_vcpu_trap_get_fault(vcpu); |
605 | if (fault_status != FSC_FAULT && fault_status != FSC_PERM) { | 603 | if (fault_status != FSC_FAULT && fault_status != FSC_PERM) { |
606 | kvm_err("Unsupported fault status: EC=%#lx DFCS=%#lx\n", | 604 | kvm_err("Unsupported fault status: EC=%#x DFCS=%#lx\n", |
607 | hsr_ec, fault_status); | 605 | kvm_vcpu_trap_get_class(vcpu), fault_status); |
608 | return -EFAULT; | 606 | return -EFAULT; |
609 | } | 607 | } |
610 | 608 | ||