From b4a3d965dee06d52281496bb5fd0a5cb5534b545 Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Tue, 1 Feb 2011 22:15:43 +0100 Subject: 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 Signed-off-by: Marcelo Tosatti --- cpus.h | 1 + 1 file changed, 1 insertion(+) (limited to 'cpus.h') diff --git a/cpus.h b/cpus.h index bf4d9bb87a..4cadb641c0 100644 --- a/cpus.h +++ b/cpus.h @@ -6,6 +6,7 @@ int qemu_init_main_loop(void); void qemu_main_loop_start(void); void resume_all_vcpus(void); void pause_all_vcpus(void); +void cpu_stop_current(void); /* vl.c */ extern int smp_cores; -- cgit v1.2.1