All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: kvm-devel <kvm@vger.kernel.org>
Cc: Avi Kivity <avi@qumranet.com>, Jerone Young <jyoung5@us.ibm.com>
Subject: [PATCH] QEMU/KVM: set cpu_single_env before flushing work
Date: Fri, 30 May 2008 23:26:47 +0200	[thread overview]
Message-ID: <48407117.1090904@web.de> (raw)

As Jerone pointed out, current kvm_invoke_guest_debug may segfault. The
reason is lacking re-initialization of cpu_single_env before
flush_queued_work is called. Here is the fix.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
---
 qemu/qemu-kvm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: b/qemu/qemu-kvm.c
===================================================================
--- a/qemu/qemu-kvm.c
+++ b/qemu/qemu-kvm.c
@@ -268,7 +268,7 @@ static void kvm_main_loop_wait(CPUState 
 	exit(1);
     }
 
-
+    cpu_single_env = env;
     flush_queued_work(env);
 
     if (vcpu_info[env->cpu_index].stop) {

             reply	other threads:[~2008-05-30 21:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-30 21:26 Jan Kiszka [this message]
2008-06-04 10:03 ` [PATCH] QEMU/KVM: set cpu_single_env before flushing work 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=48407117.1090904@web.de \
    --to=jan.kiszka@web.de \
    --cc=avi@qumranet.com \
    --cc=jyoung5@us.ibm.com \
    --cc=kvm@vger.kernel.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.