From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43564) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WxhuC-0003YN-WD for qemu-devel@nongnu.org; Thu, 19 Jun 2014 15:21:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wxhu5-0001ZI-2M for qemu-devel@nongnu.org; Thu, 19 Jun 2014 15:21:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53063) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wxhu4-0001Z3-Qc for qemu-devel@nongnu.org; Thu, 19 Jun 2014 15:21:45 -0400 Date: Thu, 19 Jun 2014 14:15:33 -0400 From: Luiz Capitulino Message-ID: <20140619141533.53d56014@redhat.com> In-Reply-To: <1403073840-32603-13-git-send-email-pbonzini@redhat.com> References: <1403073840-32603-1-git-send-email-pbonzini@redhat.com> <1403073840-32603-13-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 2.1 12/36] qapi event: convert STOP List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org, wenchaoqemu@gmail.com On Wed, 18 Jun 2014 08:43:36 +0200 Paolo Bonzini wrote: > From: Wenchao Xia >=20 > Signed-off-by: Wenchao Xia > Signed-off-by: Paolo Bonzini > --- > cpus.c | 5 +++-- > docs/qmp/qmp-events.txt | 12 ------------ > qapi-event.json | 9 +++++++++ > 3 files changed, 12 insertions(+), 14 deletions(-) >=20 > diff --git a/cpus.c b/cpus.c > index dd7ac13..87ac99f 100644 > --- a/cpus.c > +++ b/cpus.c > @@ -25,7 +25,7 @@ > /* Needed early for CONFIG_BSD etc. */ > #include "config-host.h" > =20 > -#include "monitor/monitor.h" Dropping monitor.h breaks the build with the following error: """ /home/lcapitulino/work/src/upstream/qmp-unstable/cpus.c: In function =E2=80= =98qmp_inject_nmi=E2=80=99: /home/lcapitulino/work/src/upstream/qmp-unstable/cpus.c:1490:9: error: impl= icit declaration of function =E2=80=98monitor_get_cpu_index=E2=80=99 [-Werr= or=3Dimplicit-function-declaration] if (cpu->env.cpu_num =3D=3D monitor_get_cpu_index()) { ^ /home/lcapitulino/work/src/upstream/qmp-unstable/cpus.c:1490:9: error: nest= ed extern declaration of =E2=80=98monitor_get_cpu_index=E2=80=99 [-Werror= =3Dnested-externs] cc1: all warnings being treated as errors make[1]: *** [cpus.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make: *** [subdir-s390x-softmmu] Error 2 """ I've added it back then. > +#include "qapi/qmp/qerror.h" > #include "sysemu/sysemu.h" > #include "exec/gdbstub.h" > #include "sysemu/dma.h" > @@ -38,6 +38,7 @@ > #include "qemu/main-loop.h" > #include "qemu/bitmap.h" > #include "qemu/seqlock.h" > +#include "qapi-event.h" > =20 > #ifndef _WIN32 > #include "qemu/compatfd.h" > @@ -530,7 +531,7 @@ static int do_vm_stop(RunState state) > pause_all_vcpus(); > runstate_set(state); > vm_state_notify(0, state); > - monitor_protocol_event(QEVENT_STOP, NULL); > + qapi_event_send_stop(&error_abort); > } > =20 > bdrv_drain_all(); > diff --git a/docs/qmp/qmp-events.txt b/docs/qmp/qmp-events.txt > index 20e3151..c241a07 100644 > --- a/docs/qmp/qmp-events.txt > +++ b/docs/qmp/qmp-events.txt > @@ -354,18 +354,6 @@ Example: > "channel-id": 0, "tls": true} > }} > =20 > -STOP > ----- > - > -Emitted when the Virtual Machine is stopped. > - > -Data: None. > - > -Example: > - > -{ "event": "STOP", > - "timestamp": { "seconds": 1267041730, "microseconds": 281295 } } > - > SUSPEND > ------- > =20 > diff --git a/qapi-event.json b/qapi-event.json > index f38669d..bac7fdc 100644 > --- a/qapi-event.json > +++ b/qapi-event.json > @@ -29,3 +29,12 @@ > # Since: 0.12.0 > ## > { 'event': 'RESET' } > + > +## > +# @STOP > +# > +# Emitted when the virtual machine is stopped > +# > +# Since: 0.12.0 > +## > +{ 'event': 'STOP' }