Received: from eggs.gnu.org ([2001:4830:134:3::10]:34637) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wz0vW-0004v6-Oc for qemu-devel@nongnu.org; Mon, 23 Jun 2014 05:52:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wz0vN-0004gI-Lg for qemu-devel@nongnu.org; Mon, 23 Jun 2014 05:52:38 -0400 Received: from oxygen.pond.sub.org ([2a01:4f8:201:233:1::3]:58788) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wz0vN-0004gB-El for qemu-devel@nongnu.org; Mon, 23 Jun 2014 05:52:29 -0400 From: Markus Armbruster References: <1403253206-11133-1-git-send-email-imammedo@redhat.com> <53A45753.6090505@redhat.com> <53A4C815.4040003@gmail.com> Date: Mon, 23 Jun 2014 11:52:25 +0200 In-Reply-To: <53A4C815.4040003@gmail.com> (Wenchao Xia's message of "Sat, 21 Jun 2014 07:47:33 +0800") Message-ID: <87k388lzqe.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v3] qmp: add ACPI_DEVICE_OST event handling List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wenchao Xia Cc: Igor Mammedov , qemu-devel@nongnu.org, mst@redhat.com Wenchao Xia writes: > =E4=BA=8E 2014/6/20 23:46, Eric Blake =E5=86=99=E9=81=93: >> On 06/20/2014 02:33 AM, Igor Mammedov wrote: >>> emits event when ACPI OSPM evaluates _OST method >>> of ACPI device. >>> >>> Signed-off-by: Igor Mammedov >>> --- >>> v2: >>> - use new QAPI event infrastructure >>> from rebased PCI tree on top of today's QMP pull request >>> --- >>> hw/acpi/memory_hotplug.c | 7 ++++++- >>> qapi-event.json | 10 ++++++++++ >>> 2 files changed, 16 insertions(+), 1 deletions(-) >>> >> >>> +++ b/qapi-event.json >>> @@ -304,3 +304,13 @@ >>> { 'event': 'QUORUM_REPORT_BAD', >>> 'data': { '*error': 'str', 'node-name': 'str', >>> 'sector-num': 'int', 'sector-count': 'int' } } >>> + >>> +## >>> +# @ACPI_DEVICE_OST >>> +# >>> +# Emitted when guest executes ACPI _OST method. >>> +# >>> +# @info: ACPIOSTInfo type as described in qapi-schema.json >> >> Needs 'Since: 2.1'. >> > With above added, > Reviewed-by: Wenchao Xia > >>> +## >>> +{ 'event': 'ACPI_DEVICE_OST', >>> + 'data': { 'info': 'ACPIOSTInfo' } } >>> >> >> Not your fault, as the problem already exists, but it's a bit awkward >> that qapi-event.json is not self-contained, and your patch is only >> making it worse. qapi-event.json only makes sense when included by >> qapi-schema.json, when ideally it would be nice if it made sense if >> compiled in isolation. I already pointed this fact out on Wenchao's >> series that made events part of QAPI, but fixing it first requires >> teaching the code generators to flag places where a type is used without > > > >> a pre-definition, so that we know which types have to be moved into a >> common include. So don't let this comment hold up your patch. >> > I think two issues should be addressed: > 1 don't let generator guess the type if define is not found. > 2 Support duplicated include, that is: > > qapi/types.json > | > --------------------------- > | | > qapi/qapi-event.json qapi/block.json > | | > qapi-schema-json > > Making sure above include doesn't generate two copy of types from > qapi/types.json. See Beno=C3=AEt's commit 24fd848 "qapi: skip redundant includes". > We can improve it later. > >> If you add the Since line, >> Reviewed-by: Eric Blake