From patchwork Thu Feb 25 15:06:59 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [2/5] QMP: Move STOP event into do_vm_stop() From: Luiz Capitulino X-Patchwork-Id: 46243 Message-Id: <1267110422-25873-3-git-send-email-lcapitulino@redhat.com> To: qemu-devel@nongnu.org Date: Thu, 25 Feb 2010 12:06:59 -0300 I've introduced the STOP event in the main loop, this is wrong as it will be only emitted if the io thread is enabled. This fixes that by moving the STOP event to do_vm_stop(). Signed-off-by: Luiz Capitulino --- vl.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/vl.c b/vl.c index db7a178..1735dd2 100644 --- a/vl.c +++ b/vl.c @@ -3106,6 +3106,7 @@ static void do_vm_stop(int reason) vm_running = 0; pause_all_vcpus(); vm_state_notify(0, reason); + monitor_protocol_event(QEVENT_STOP, NULL); } } @@ -4073,7 +4074,6 @@ static void main_loop(void) qemu_irq_raise(qemu_system_powerdown); } if ((r = qemu_vmstop_requested())) { - monitor_protocol_event(QEVENT_STOP, NULL); vm_stop(r); } }