kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: Alexander Graf <agraf@suse.de>, Gleb Natapov <gleb@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Cc: Mihai Caraman <mihai.caraman@freescale.com>,
	<kvm-ppc@vger.kernel.org>, <kvm@vger.kernel.org>,
	Scott Wood <scottwood@freescale.com>
Subject: [PATCH 7/8] kvm/ppc/booke: Delay kvmppc_fix_ee_before_entry
Date: Thu, 6 Jun 2013 19:16:35 -0500	[thread overview]
Message-ID: <1370564196-3821-8-git-send-email-scottwood@freescale.com> (raw)
In-Reply-To: <1370564196-3821-1-git-send-email-scottwood@freescale.com>

kwmppc_fix_ee_before_entry() should be called as late as possible,
or else we get things like WARN_ON(preemptible()) in enable_kernel_fp()
in configurations where preemptible() works.

Note that book3s_pr already waits until just before __kvmppc_vcpu_run
to call kvmppc_fix_ee_before_entry().

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

diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
index c5270a3..f953324 100644
--- a/arch/powerpc/kvm/booke.c
+++ b/arch/powerpc/kvm/booke.c
@@ -671,7 +671,6 @@ int kvmppc_vcpu_run(struct kvm_run *kvm_run, struct kvm_vcpu *vcpu)
 		ret = s;
 		goto out;
 	}
-	kvmppc_fix_ee_before_entry();
 
 	kvm_guest_enter();
 
@@ -697,6 +696,8 @@ int kvmppc_vcpu_run(struct kvm_run *kvm_run, struct kvm_vcpu *vcpu)
 	kvmppc_load_guest_fp(vcpu);
 #endif
 
+	kvmppc_fix_ee_before_entry();
+
 	ret = __kvmppc_vcpu_run(kvm_run, vcpu);
 
 	/* No need for kvm_guest_exit. It's done in handle_exit.
-- 
1.7.10.4

  parent reply	other threads:[~2013-06-07  0:16 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-07  0:16 [PATCH 0/8] kvm/ppc: fixes for 3.10 Scott Wood
2013-06-07  0:16 ` [PATCH 1/8] kvm/ppc/booke64: Fix AltiVec interrupt numbers and build breakage Scott Wood
2013-06-07  0:16 ` [PATCH 2/8] kvm/ppc/booke64: Disable e6500 support Scott Wood
2013-06-07  0:16 ` [PATCH 3/8] kvm/ppc/booke: Hold srcu lock when calling gfn functions Scott Wood
2013-06-07  0:16 ` [PATCH 4/8] kvm/ppc/booke64: Fix lazy ee handling in kvmppc_handle_exit() Scott Wood
2013-06-07  0:16 ` [PATCH 5/8] kvm/ppc: Call trace_hardirqs_on before entry Scott Wood
2013-06-07  0:16 ` [PATCH 6/8] kvm/ppc: IRQ disabling cleanup Scott Wood
2013-06-07  0:16 ` Scott Wood [this message]
2013-06-07  0:16 ` [PATCH 8/8] kvm/ppc/booke: Don't call kvm_guest_enter twice Scott Wood
2013-06-09  8:09 ` [PATCH 0/8] kvm/ppc: fixes for 3.10 Gleb Natapov
2013-06-10 19:52   ` Scott Wood
2013-06-17 15:27     ` Paolo Bonzini
2013-07-09  7:21 ` tiejun.chen
2013-07-09  8:53   ` Alexander Graf
2013-07-09  9:09     ` tiejun.chen
2013-07-09 21:33       ` Alexander Graf
2013-07-10  6:03         ` tiejun.chen

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=1370564196-3821-8-git-send-email-scottwood@freescale.com \
    --to=scottwood@freescale.com \
    --cc=agraf@suse.de \
    --cc=gleb@redhat.com \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=mihai.caraman@freescale.com \
    --cc=pbonzini@redhat.com \
    /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).