summaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2011-02-01 22:15:43 +0100
committerMarcelo Tosatti <mtosatti@redhat.com>2011-02-14 12:39:44 -0200
commitb4a3d965dee06d52281496bb5fd0a5cb5534b545 (patch)
tree3d1c0bb7600ea91eea18e27530c3afa2ec41bbf7 /vl.c
parentaa2c364b4cf2fae4d9c8acf53ee4436ed533902d (diff)
downloadqemu-b4a3d965dee06d52281496bb5fd0a5cb5534b545.tar.gz
qemu-b4a3d965dee06d52281496bb5fd0a5cb5534b545.tar.bz2
qemu-b4a3d965dee06d52281496bb5fd0a5cb5534b545.zip
Stop current VCPU on synchronous reset requests
If some I/O operation ends up calling qemu_system_reset_request in VCPU context, we record this and inform the io-thread, but we do not terminate the VCPU loop. This can lead to fairly unexpected behavior if the triggering reset operation is supposed to work synchronously. Fix this for TCG (when run in deterministic I/O mode) by setting the VCPU on stop and issuing a cpu_exit. KVM requires some more work on its VCPU loop. [ ported from qemu-kvm ] Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/vl.c b/vl.c
index ed2cdfae42..5e3f7f24e9 100644
--- a/vl.c
+++ b/vl.c
@@ -1296,6 +1296,7 @@ void qemu_system_reset_request(void)
} else {
reset_requested = 1;
}
+ cpu_stop_current();
qemu_notify_event();
}