From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Graf Date: Wed, 16 May 2012 13:05:19 +0000 Subject: [PATCH 5/5] KVM: PPC: Book3S HV: Fix bug leading to deadlock in guest HPT updates Message-Id: <1337173519-6780-6-git-send-email-agraf@suse.de> List-Id: References: <1337173519-6780-1-git-send-email-agraf@suse.de> In-Reply-To: <1337173519-6780-1-git-send-email-agraf@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: "kvm@vger.kernel.org list" Cc: Avi Kivity , kvm-ppc@vger.kernel.org, mtosatti@redhat.com, Paul Mackerras From: Paul Mackerras 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 a92bce95f0 ("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 Signed-off-by: Alexander Graf --- arch/powerpc/kvm/book3s_hv_rm_mmu.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/kvm/book3s_hv_rm_mmu.c b/arch/powerpc/kvm/book3s_hv_rm_mmu.c index def880a..cec4dad 100644 --- a/arch/powerpc/kvm/book3s_hv_rm_mmu.c +++ b/arch/powerpc/kvm/book3s_hv_rm_mmu.c @@ -463,6 +463,7 @@ long kvmppc_h_bulk_remove(struct kvm_vcpu *vcpu) /* insert R and C bits from PTE */ rcbits = rev->guest_rpte & (HPTE_R_R|HPTE_R_C); args[j] |= rcbits << (56 - 5); + hp[0] = 0; continue; } -- 1.6.0.2