From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O4Khn-00073H-DB for qemu-devel@nongnu.org; Tue, 20 Apr 2010 17:10:03 -0400 Received: from [140.186.70.92] (port=37192 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O4Khm-000738-1I for qemu-devel@nongnu.org; Tue, 20 Apr 2010 17:10:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O4Khk-0003sX-87 for qemu-devel@nongnu.org; Tue, 20 Apr 2010 17:10:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:13114) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O4Khj-0003sP-Uh for qemu-devel@nongnu.org; Tue, 20 Apr 2010 17:10:00 -0400 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o3KL9xKE020364 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 20 Apr 2010 17:09:59 -0400 From: Luiz Capitulino Date: Tue, 20 Apr 2010 18:09:31 -0300 Message-Id: <1271797792-24571-2-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1271797792-24571-1-git-send-email-lcapitulino@redhat.com> References: <1271797792-24571-1-git-send-email-lcapitulino@redhat.com> Subject: [Qemu-devel] [PATCH 01/22] QMP: Introduce RESUME event List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, armbru@redhat.com, quintela@redhat.com, kwolf@redhat.com It's emitted when the Virtual Machine resumes execution. This is needed because next patches will convert savevm/loadvm to QMP and they call vm_stop() (which causes QMP to emit the STOP event) and vm_start() (which doesn't emit any event). Clients will get confused with a STOP event without a matching RESUME event. Signed-off-by: Luiz Capitulino --- QMP/qmp-events.txt | 12 ++++++++++++ monitor.c | 3 +++ monitor.h | 1 + vl.c | 1 + 4 files changed, 17 insertions(+), 0 deletions(-) diff --git a/QMP/qmp-events.txt b/QMP/qmp-events.txt index c084a47..01ec85f 100644 --- a/QMP/qmp-events.txt +++ b/QMP/qmp-events.txt @@ -38,6 +38,18 @@ Example: { "event": "RESET", "timestamp": { "seconds": 1267041653, "microseconds": 9518 } } +RESUME +------ + +Emitted when the Virtual Machine resumes execution. + +Data: None. + +Example: + +{ "event": "RESUME", + "timestamp": { "seconds": 1271770767, "microseconds": 582542 } } + RTC_CHANGE ---------- diff --git a/monitor.c b/monitor.c index afea639..975e77c 100644 --- a/monitor.c +++ b/monitor.c @@ -423,6 +423,9 @@ void monitor_protocol_event(MonitorEvent event, QObject *data) case QEVENT_STOP: event_name = "STOP"; break; + case QEVENT_RESUME: + event_name = "RESUME"; + break; case QEVENT_VNC_CONNECTED: event_name = "VNC_CONNECTED"; break; diff --git a/monitor.h b/monitor.h index 5bdeed1..ea15469 100644 --- a/monitor.h +++ b/monitor.h @@ -21,6 +21,7 @@ typedef enum MonitorEvent { QEVENT_RESET, QEVENT_POWERDOWN, QEVENT_STOP, + QEVENT_RESUME, QEVENT_VNC_CONNECTED, QEVENT_VNC_INITIALIZED, QEVENT_VNC_DISCONNECTED, diff --git a/vl.c b/vl.c index b997cb9..3ba1dc6 100644 --- a/vl.c +++ b/vl.c @@ -1692,6 +1692,7 @@ void vm_start(void) vm_running = 1; vm_state_notify(1, 0); resume_all_vcpus(); + monitor_protocol_event(QEVENT_RESUME, NULL); } } -- 1.7.1.rc1.12.ga6018