Set cpu_single_env before flushing work
commita082cd39edc59935986d4645f40a2d2c92fff256
authorJan Kiszka <jan.kiszka@web.de>
Fri, 30 May 2008 21:26:47 +0000 (30 23:26 +0200)
committerAvi Kivity <avi@qumranet.com>
Wed, 4 Jun 2008 10:03:18 +0000 (4 13:03 +0300)
tree282302daf42b931f161b006e23b38da26e4f0501
parent1ef6b9934c1db644312c64f0c05f6bab75d74c69
Set cpu_single_env before flushing work

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>
Signed-off-by: Avi Kivity <avi@qumranet.com>
qemu-kvm.c