linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: Alexander Graf <agraf@suse.de>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Scott Wood <scottwood@freescale.com>,
	linuxppc-dev@lists.ozlabs.org, kvm@vger.kernel.org,
	kvm-ppc@vger.kernel.org
Subject: [PATCH v2 2/4] kvm/ppc/booke64: Fix lazy ee handling in kvmppc_handle_exit()
Date: Thu, 9 May 2013 22:09:42 -0500	[thread overview]
Message-ID: <1368155384-11035-3-git-send-email-scottwood@freescale.com> (raw)
In-Reply-To: <1368155384-11035-1-git-send-email-scottwood@freescale.com>

EE is hard-disabled on entry to kvmppc_handle_exit(), so call
hard_irq_disable() so that PACA_IRQ_HARD_DIS is set, and soft_enabled
is unset.

Without this, we get warnings such as arch/powerpc/kernel/time.c:300,
and sometimes host kernel hangs.

Signed-off-by: Scott Wood <scottwood@freescale.com>
---
 arch/powerpc/kvm/booke.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
index 1020119..705fc5c 100644
--- a/arch/powerpc/kvm/booke.c
+++ b/arch/powerpc/kvm/booke.c
@@ -833,6 +833,11 @@ int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu,
 	int r = RESUME_HOST;
 	int s;
 
+#ifdef CONFIG_PPC64
+	WARN_ON(local_paca->irq_happened != 0);
+#endif
+	hard_irq_disable();
+
 	/* update before a new last_exit_type is rewritten */
 	kvmppc_update_timing_stats(vcpu);
 
-- 
1.7.10.4

  parent reply	other threads:[~2013-05-10  3:09 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-10  3:09 [PATCH v2 0/4] kvm/ppc: interrupt disabling fixes Scott Wood
2013-05-10  3:09 ` [PATCH v2 1/4] powerpc: hard_irq_disable(): Call trace_hardirqs_off after disabling Scott Wood
2013-05-10  7:00   ` Benjamin Herrenschmidt
2013-05-10  3:09 ` Scott Wood [this message]
2013-05-10  5:01   ` [PATCH v2 2/4] kvm/ppc/booke64: Fix lazy ee handling in kvmppc_handle_exit() Bhushan Bharat-R65777
2013-05-10 22:43     ` Scott Wood
2013-05-10  3:09 ` [PATCH v2 3/4] kvm/ppc: Call trace_hardirqs_on before entry Scott Wood
2013-05-10  3:34   ` Bhushan Bharat-R65777
2013-05-10  4:40     ` tiejun.chen
2013-05-10 22:47       ` Scott Wood
2013-05-10  3:09 ` [PATCH v2 4/4] kvm/ppc: IRQ disabling cleanup Scott Wood
2013-05-10  5:01   ` Bhushan Bharat-R65777
2013-05-10  5:31     ` tiejun.chen
2013-05-10 22:53     ` Scott Wood

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=1368155384-11035-3-git-send-email-scottwood@freescale.com \
    --to=scottwood@freescale.com \
    --cc=agraf@suse.de \
    --cc=benh@kernel.crashing.org \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).