Skip to content

Commit 87ecfdb

Browse files
committed
KVM: e500: always restore irqs
If find_linux_pte fails, IRQs will not be restored. This is unlikely to happen in practice since it would have been reported as hanging hosts, but it should of course be fixed anyway. Cc: [email protected] Reported-by: Sean Christopherson <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent f07044d commit 87ecfdb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/powerpc/kvm/e500_mmu_host.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,6 @@ static inline int kvmppc_e500_shadow_map(struct kvmppc_vcpu_e500 *vcpu_e500,
479479
if (pte_present(pte)) {
480480
wimg = (pte_val(pte) >> PTE_WIMGE_SHIFT) &
481481
MAS2_WIMGE_MASK;
482-
local_irq_restore(flags);
483482
} else {
484483
local_irq_restore(flags);
485484
pr_err_ratelimited("%s: pte not present: gfn %lx,pfn %lx\n",
@@ -488,8 +487,9 @@ static inline int kvmppc_e500_shadow_map(struct kvmppc_vcpu_e500 *vcpu_e500,
488487
goto out;
489488
}
490489
}
491-
writable = kvmppc_e500_ref_setup(ref, gtlbe, pfn, wimg);
490+
local_irq_restore(flags);
492491

492+
writable = kvmppc_e500_ref_setup(ref, gtlbe, pfn, wimg);
493493
kvmppc_e500_setup_stlbe(&vcpu_e500->vcpu, gtlbe, tsize,
494494
ref, gvaddr, stlbe);
495495

0 commit comments

Comments
 (0)