From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57075) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aVD3o-0005xR-Dv for qemu-devel@nongnu.org; Mon, 15 Feb 2016 01:55:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aVD3l-0008QN-54 for qemu-devel@nongnu.org; Mon, 15 Feb 2016 01:55:04 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37117) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aVD3k-0008QG-Vh for qemu-devel@nongnu.org; Mon, 15 Feb 2016 01:55:01 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 4029E71 for ; Mon, 15 Feb 2016 06:54:59 +0000 (UTC) References: <1455428503-2113-1-git-send-email-peterx@redhat.com> From: Wei Huang Message-ID: <56C17641.5090208@redhat.com> Date: Mon, 15 Feb 2016 00:54:57 -0600 MIME-Version: 1.0 In-Reply-To: <1455428503-2113-1-git-send-email-peterx@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH 0/2] ARM: add QMP command to query GIC version List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Xu , qemu-devel@nongnu.org, libvir-list@redhat.com Cc: drjones@redhat.com, abologna@redhat.com On 2/13/16 23:41, Peter Xu wrote: > For ARM platform, we still do not have any interface to query > whether current QEMU/host support specific GIC version. This > patchset is trying to add one QMP interface for that. By querying > the GIC capability using the new interface, one should know exactly > what GIC version(s) the platform will support. The capability bits > will be decided by both QEMU and host kernel. > > The current patchset only provides interface for review. Its handler > is a fake one which returns empty always. > > The command interface I am planning to add is something like this: > > -> { "execute": "query-gic-capability" } > <- { "return": [ "gicv2", "gicv2-kvm", "gicv3-kvm" ] } > > Currently, all the possible supported GIC versions are: > > - gicv2: GIC version 2 without kernel IRQ chip > - gicv2-kvm: GIC version 2 with kernel IRQ chip > - gicv3: GIC version 3 without kernel IRQ chip (not supported) > - gicv3-kvm: GIC version 3 with kernel IRQ chip > > Since "gicv3" is still not supported (to use GICv3, kernel irqchip > support is required for now, which corresponds to "gicv3-kvm"), > currently the maximum superset of the result should be: > > ["gicv2", "gicv2-kvm", "gicv3-kvm"] > > Please help review whether the interface suits our need, also please > point out any error I have made. I tested QEMU with these patches and they were able to work on a native ARM64 machine. > > One question: how should I make this command "ARM only"? I see that > in qmp-commands.hx, I can use something like "#if defined > TARGET_ARM" to block out ARM specified commands, however how should > I do the similiar thing in qapi-schema.json? This situation is similar to "rtc-reset-reinjection", right? I think You can disable this feature on other arch's by setting QERR_FEATURE_DISABLED in file like monitor.c. > > Thanks! > Peter > > Peter Xu (2): > arm: gic: add GICType > arm: gic: add "query-gic-capability" interface > > qapi-schema.json | 28 ++++++++++++++++++++++++++++ > qmp-commands.hx | 25 +++++++++++++++++++++++++ > qmp.c | 5 +++++ > scripts/qapi.py | 1 + > 4 files changed, 59 insertions(+) >