Skip to content

Commit 51bfd29

Browse files
paulusmackagraf
authored andcommitted
KVM: PPC: Book3S HV: Fix bug leading to deadlock in guest HPT updates
When handling the H_BULK_REMOVE hypercall, we were forgetting to invalidate and unlock the hashed page table entry (HPTE) in the case where the page had been paged out. This fixes it by clearing the first doubleword of the HPTE in that case. This fixes a regression introduced in commit a92bce9 ("KVM: PPC: Book3S HV: Keep HPTE locked when invalidating"). The effect of the regression is that the host kernel will sometimes hang when under memory pressure. Signed-off-by: Paul Mackerras <[email protected]> Signed-off-by: Alexander Graf <[email protected]>
1 parent ffe3649 commit 51bfd29

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/powerpc/kvm/book3s_hv_rm_mmu.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,7 @@ long kvmppc_h_bulk_remove(struct kvm_vcpu *vcpu)
463463
/* insert R and C bits from PTE */
464464
rcbits = rev->guest_rpte & (HPTE_R_R|HPTE_R_C);
465465
args[j] |= rcbits << (56 - 5);
466+
hp[0] = 0;
466467
continue;
467468
}
468469

0 commit comments

Comments
 (0)