From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55701) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aiaC0-00089e-UC for qemu-devel@nongnu.org; Wed, 23 Mar 2016 00:14:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aiaBz-00053t-Tt for qemu-devel@nongnu.org; Wed, 23 Mar 2016 00:14:48 -0400 Date: Wed, 23 Mar 2016 12:14:29 +0800 From: Peter Xu Message-ID: <20160323041429.GG28183@pxdev.xzpeter.org> References: <1458271654-23706-1-git-send-email-peterx@redhat.com> <1458271654-23706-3-git-send-email-peterx@redhat.com> <874mbyl64i.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <874mbyl64i.fsf@blackfin.pond.sub.org> Subject: Re: [Qemu-devel] [PATCH v5 2/5] arm: qmp: add query-gic-capabilities interface List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: wei@redhat.com, peter.maydell@linaro.org, drjones@redhat.com, mdroth@linux.vnet.ibm.com, qemu-devel@nongnu.org, abologna@redhat.com, qemu-arm@nongnu.org On Tue, Mar 22, 2016 at 07:28:13PM +0100, Markus Armbruster wrote: > Peter Xu writes: > > diff --git a/scripts/qapi.py b/scripts/qapi.py > > index 6b2aa6e..716474e 100644 > > --- a/scripts/qapi.py > > +++ b/scripts/qapi.py > > @@ -46,6 +46,7 @@ returns_whitelist = [ > # Whitelist of commands allowed to return a non-dictionary > returns_whitelist = [ > 'human-monitor-command', > 'qom-get', > 'query-migrate-cache-size', > > 'query-tpm-models', > > 'query-tpm-types', > > 'ringbuf-read', > > + 'query-gic-capability', > > > > # From QGA: > > 'guest-file-open', > > The whitelist exists to except existing commands from design rules on > return types. New commands don't get to violate the rules without a > really, really compelling reason. > > Do you actually need this? > > If yes, why should your command be permitted to violate the design > rules? This might not be required. Agree with you and Eric. Will use a hash instead with single key. > > +#include "qemu/osdep.h" > > +#include "hw/boards.h" > > +#include "qemu/error-report.h" > > +#include "sysemu/kvm.h" > > +#include "qmp-commands.h" > > I very much doubt you need all these includes. Try dropping all but the > first and the last one. I just copied them from machine.c and dropped lots, seems still redundant... Will keep it a minimum subset in next version. Thanks! -- peterx