Skip to content

Commit cc906f0

Browse files
committed
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.
2 parents 7e71268 + 6579804 commit cc906f0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

arch/powerpc/kvm/book3s_64_mmu_radix.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -646,6 +646,16 @@ int kvmppc_book3s_radix_page_fault(struct kvm_run *run, struct kvm_vcpu *vcpu,
646646
*/
647647
local_irq_disable();
648648
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+
}
649659
pte = *ptep;
650660
local_irq_enable();
651661

0 commit comments

Comments
 (0)