From: Mahesh J Salgaonkar <mahesh@linux.vnet.ibm.com>
To: linuxppc-dev <linuxppc-dev@ozlabs.org>,
Paul Mackerras <paulus@samba.org>,
Michael Ellerman <mpe@ellerman.id.au>
Cc: KVM-PPC <kvm-ppc@vger.kernel.org>, KVM <kvm@vger.kernel.org>
Subject: [PATCH 3/3] KVM: PPC: Book3S HV: Fix soft lockups in KVM on HMI for time base errors
Date: Thu, 14 Jan 2016 03:27:28 +0000 [thread overview]
Message-ID: <20160114031528.1287.7326.stgit@mars> (raw)
In-Reply-To: <20160114031457.1287.32132.stgit@mars>
From: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
When secondaries are napping in kvm_unsplit_nap() with hwthread_req = 1,
the HMI goes ignored even though subcores are already exited the guest.
Hence HMI keeps waking up secondaries from nap in a loop and secondaries
always go back to nap since no vcore is assigned to them. This makes
impossible for primary thread to get hold of secondary threads resulting
into a soft lockup in KVM path.
This patch fixes this by adding a HMI check just before the thread goes
to unsplit nap.
Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
---
arch/powerpc/kvm/book3s_hv_rmhandlers.S | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
index e8a456e..c5d43b9 100644
--- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S
+++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
@@ -440,6 +440,12 @@ kvm_no_guest:
* whole-core mode, so we need to nap.
*/
kvm_unsplit_nap:
+ /* Before we head down to nap, check if HMI is pending and handle it */
+ cmpwi r12, BOOK3S_INTERRUPT_HMI
+ bne 55f
+ li r3, 0 /* NULL argument */
+ bl hmi_exception_realmode
+55:
/*
* Ensure that secondary doesn't nap when it has
* its vcore pointer set.
WARNING: multiple messages have this Message-ID (diff)
From: Mahesh J Salgaonkar <mahesh@linux.vnet.ibm.com>
To: linuxppc-dev <linuxppc-dev@ozlabs.org>,
Paul Mackerras <paulus@samba.org>,
Michael Ellerman <mpe@ellerman.id.au>
Cc: KVM-PPC <kvm-ppc@vger.kernel.org>, KVM <kvm@vger.kernel.org>
Subject: [PATCH 3/3] KVM: PPC: Book3S HV: Fix soft lockups in KVM on HMI for time base errors
Date: Thu, 14 Jan 2016 08:45:28 +0530 [thread overview]
Message-ID: <20160114031528.1287.7326.stgit@mars> (raw)
In-Reply-To: <20160114031457.1287.32132.stgit@mars>
From: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
When secondaries are napping in kvm_unsplit_nap() with hwthread_req = 1,
the HMI goes ignored even though subcores are already exited the guest.
Hence HMI keeps waking up secondaries from nap in a loop and secondaries
always go back to nap since no vcore is assigned to them. This makes
impossible for primary thread to get hold of secondary threads resulting
into a soft lockup in KVM path.
This patch fixes this by adding a HMI check just before the thread goes
to unsplit nap.
Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
---
arch/powerpc/kvm/book3s_hv_rmhandlers.S | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
index e8a456e..c5d43b9 100644
--- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S
+++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
@@ -440,6 +440,12 @@ kvm_no_guest:
* whole-core mode, so we need to nap.
*/
kvm_unsplit_nap:
+ /* Before we head down to nap, check if HMI is pending and handle it */
+ cmpwi r12, BOOK3S_INTERRUPT_HMI
+ bne 55f
+ li r3, 0 /* NULL argument */
+ bl hmi_exception_realmode
+55:
/*
* Ensure that secondary doesn't nap when it has
* its vcore pointer set.
next prev parent reply other threads:[~2016-01-14 3:27 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-14 3:14 [PATCH 1/3] Powernv: Remove the usage of PACAR1 from opal wrappers Mahesh J Salgaonkar
2016-01-14 3:26 ` Mahesh J Salgaonkar
2016-01-14 3:14 ` Mahesh J Salgaonkar
2016-01-14 3:15 ` [PATCH 2/3] powerpc/book3s: Fix TB corruption in guest exit path on HMI interrupt Mahesh J Salgaonkar
2016-01-14 3:27 ` Mahesh J Salgaonkar
2016-03-18 4:51 ` Paul Mackerras
2016-03-18 4:51 ` Paul Mackerras
2016-05-15 4:21 ` Mahesh Jagannath Salgaonkar
2016-05-15 4:33 ` Mahesh Jagannath Salgaonkar
2016-01-14 3:15 ` Mahesh J Salgaonkar [this message]
2016-01-14 3:27 ` [PATCH 3/3] KVM: PPC: Book3S HV: Fix soft lockups in KVM on HMI for time base errors Mahesh J Salgaonkar
2016-03-18 3:33 ` [1/3] Powernv: Remove the usage of PACAR1 from opal wrappers Michael Ellerman
2016-03-18 3:33 ` Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160114031528.1287.7326.stgit@mars \
--to=mahesh@linux.vnet.ibm.com \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.