kvm: qemu: set cpu_single_env before flushing work
commit28b1ef7c357c69cf1eff57507343fdccac5df2dd
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)
tree0050b24382c5439c78b7528bc34343415b7d4872
parent7909eb65f684c8ac526d8e8f735c8186fee55bf5
kvm: qemu: 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/qemu-kvm.c