* [PATCH] QEMU/KVM: set cpu_single_env before flushing work
@ 2008-05-30 21:26 Jan Kiszka
2008-06-04 10:03 ` Avi Kivity
0 siblings, 1 reply; 2+ messages in thread
From: Jan Kiszka @ 2008-05-30 21:26 UTC (permalink / raw)
To: kvm-devel; +Cc: Avi Kivity, Jerone Young
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) {
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] QEMU/KVM: set cpu_single_env before flushing work
2008-05-30 21:26 [PATCH] QEMU/KVM: set cpu_single_env before flushing work Jan Kiszka
@ 2008-06-04 10:03 ` Avi Kivity
0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2008-06-04 10:03 UTC (permalink / raw)
To: Jan Kiszka; +Cc: kvm-devel, Jerone Young
Jan Kiszka wrote:
> 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.
>
>
Applied, thanks. I also removed the same assignment a few lines later.
--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-06-04 10:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-30 21:26 [PATCH] QEMU/KVM: set cpu_single_env before flushing work Jan Kiszka
2008-06-04 10:03 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox