diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2018-10-05 03:39:53 -0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2018-10-05 03:39:53 -0400 |
commit | cc906f07d7d569a30bb6f0baf8f80b2968353dc9 (patch) | |
tree | 5a0098288a77c5a4482dd3d820c8d22cd443c3d8 | |
parent | 7e7126846c95a34f98a1524d5c473af1f0783735 (diff) | |
parent | 6579804c431712d56956a63b1a01509441cc6800 (diff) |
Merge tag 'kvm-ppc-fixes-4.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc into kvm-master
Third set of PPC KVM fixes for 4.19
One patch here, fixing a potential host crash introduced (or at least
exacerbated) by a previous fix for corruption relating to radix guest
page faults and THP operations.
-rw-r--r-- | arch/powerpc/kvm/book3s_64_mmu_radix.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/book3s_64_mmu_radix.c b/arch/powerpc/kvm/book3s_64_mmu_radix.c index 933c574e1cf7..998f8d089ac7 100644 --- a/arch/powerpc/kvm/book3s_64_mmu_radix.c +++ b/arch/powerpc/kvm/book3s_64_mmu_radix.c | |||
@@ -646,6 +646,16 @@ int kvmppc_book3s_radix_page_fault(struct kvm_run *run, struct kvm_vcpu *vcpu, | |||
646 | */ | 646 | */ |
647 | local_irq_disable(); | 647 | local_irq_disable(); |
648 | ptep = __find_linux_pte(vcpu->arch.pgdir, hva, NULL, &shift); | 648 | ptep = __find_linux_pte(vcpu->arch.pgdir, hva, NULL, &shift); |
649 | /* | ||
650 | * If the PTE disappeared temporarily due to a THP | ||
651 | * collapse, just return and let the guest try again. | ||
652 | */ | ||
653 | if (!ptep) { | ||
654 | local_irq_enable(); | ||
655 | if (page) | ||
656 | put_page(page); | ||
657 | return RESUME_GUEST; | ||
658 | } | ||
649 | pte = *ptep; | 659 | pte = *ptep; |
650 | local_irq_enable(); | 660 | local_irq_enable(); |
651 | 661 | ||