public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka-S0/GAf8tV78@public.gmane.org>
To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: [PATCH] call preempt_notifier_init early enough
Date: Tue, 23 Oct 2007 00:56:15 +0200	[thread overview]
Message-ID: <471D2A8F.3070303@web.de> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1198 bytes --]

As vmx_create_vcpu already makes use of start/end_special_insn, we need
to initialise the emulated preempt_notifier earlier. Let's move it to
kvm_vcpu_init. This should fix an oops I've seen here at least once
during kvm startup - so far the problem did not show up again.

Signed-off-by: Jan Kiszka <jan.kiszka-S0/GAf8tV78@public.gmane.org>

---
 kernel/kvm_main.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: kvm-48/kernel/kvm_main.c
===================================================================
--- kvm-48.orig/kernel/kvm_main.c
+++ kvm-48/kernel/kvm_main.c
@@ -261,6 +261,8 @@ int kvm_vcpu_init(struct kvm_vcpu *vcpu,
 		vcpu->mp_state = VCPU_MP_STATE_UNINITIALIZED;
 	init_waitqueue_head(&vcpu->wq);
 
+	preempt_notifier_init(&vcpu->preempt_notifier, &kvm_preempt_ops);
+
 	page = alloc_page(GFP_KERNEL | __GFP_ZERO);
 	if (!page) {
 		r = -ENOMEM;
@@ -2664,8 +2666,6 @@ static int kvm_vm_ioctl_create_vcpu(stru
 	if (IS_ERR(vcpu))
 		return PTR_ERR(vcpu);
 
-	preempt_notifier_init(&vcpu->preempt_notifier, &kvm_preempt_ops);
-
 	/* We do fxsave: this must be aligned. */
 	BUG_ON((unsigned long)&vcpu->host_fx_image & 0xF);
 


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]

[-- Attachment #2: Type: text/plain, Size: 314 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/

[-- Attachment #3: Type: text/plain, Size: 186 bytes --]

_______________________________________________
kvm-devel mailing list
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/kvm-devel

             reply	other threads:[~2007-10-22 22:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-22 22:56 Jan Kiszka [this message]
     [not found] ` <471D2A8F.3070303-S0/GAf8tV78@public.gmane.org>
2007-10-23  8:40   ` [PATCH] call preempt_notifier_init early enough Avi Kivity

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=471D2A8F.3070303@web.de \
    --to=jan.kiszka-s0/gaf8tv78@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.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