From: Martin Kletzander <mkletzan@redhat.com>
To: Peter Xu <peterx@redhat.com>
Cc: libvir-list@redhat.com, wei@redhat.com, drjones@redhat.com,
qemu-devel@nongnu.org, abologna@redhat.com
Subject: Re: [Qemu-devel] [libvirt] [RFC PATCH 0/2] ARM: add QMP command to query GIC version
Date: Mon, 15 Feb 2016 10:35:39 +0100 [thread overview]
Message-ID: <20160215093539.GD15724@wheatley> (raw)
In-Reply-To: <1455428503-2113-1-git-send-email-peterx@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 3235 bytes --]
On Sun, Feb 14, 2016 at 01:41:41PM +0800, 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.
>
This looks nice. I have some questions, but I'm not an expert in this
area, so excuse me if they are stupid.
So hardware itself supports some GIC version, let's say 3 for our case.
Does that mean it can be triggered to do v2 as well? I mean is it
possible that HW supports multiple versions? If yes, then I suspect
there is (will be) HW that does *not* do it and that's where QEMU (or
KVM) must emulate that version. If all I'm having in mind is true, then
you are trying to reply with two orthogonal types of information. A)
versions kernel/HW supports and B) qemu/kvm can emulate. That is fine
if libvirt can choose all the versions specified (e.g. gicv2-kvm,
gicv2), but if we can only select a version, then it might be worth just
returning those two types of information separately, e.g.:
["v2": {"emulated": true, "kvm":true}, "v3": {"emulated": false, "kvm": true}]
But as I said, I don't know the pre-requisites for this and mainly I'm
not dealing with arm support now in libvirt, I'm just curious about it.
>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?
>
As mentioned in the other thread, making it available everywhere and
just returning a proper error message (so we can parse the class and not
the error message itself) is the best choice, IMHO.
>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(+)
>
>--
>2.4.3
>
>--
>libvir-list mailing list
>libvir-list@redhat.com
>https://www.redhat.com/mailman/listinfo/libvir-list
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-02-15 9:35 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-14 5:41 [Qemu-devel] [RFC PATCH 0/2] ARM: add QMP command to query GIC version Peter Xu
2016-02-14 5:41 ` [Qemu-devel] [RFC PATCH 1/2] arm: gic: add GICType Peter Xu
2016-02-14 5:41 ` [Qemu-devel] [RFC PATCH 2/2] arm: gic: add "query-gic-capability" interface Peter Xu
2016-02-15 6:54 ` [Qemu-devel] [RFC PATCH 0/2] ARM: add QMP command to query GIC version Wei Huang
2016-02-15 7:34 ` Peter Xu
2016-02-15 7:49 ` Fam Zheng
2016-02-15 9:35 ` Martin Kletzander [this message]
2016-02-15 9:41 ` [Qemu-devel] [libvirt] " Peter Maydell
2016-02-15 12:16 ` Andrew Jones
2016-02-15 12:27 ` Pavel Fedin
2016-02-15 10:09 ` Peter Xu
2016-02-15 9:52 ` [Qemu-devel] " Markus Armbruster
2016-02-15 10:34 ` Peter Xu
2016-02-15 15:08 ` Markus Armbruster
2016-02-15 15:21 ` Peter Maydell
2016-02-15 19:40 ` Markus Armbruster
2016-02-15 20:18 ` Andrew Jones
2016-02-15 20:32 ` Peter Maydell
2016-02-16 10:10 ` Markus Armbruster
2016-02-16 10:15 ` Daniel P. Berrange
2016-02-16 12:05 ` [Qemu-devel] [libvirt] " Andrea Bolognani
2016-02-16 12:09 ` Peter Maydell
2016-02-16 12:20 ` Andrea Bolognani
2016-02-16 12:15 ` Daniel P. Berrange
2016-02-16 12:27 ` Andrea Bolognani
2016-02-16 12:38 ` Daniel P. Berrange
2016-02-16 13:14 ` Andrea Bolognani
2016-02-15 15:22 ` [Qemu-devel] " Daniel P. Berrange
2016-02-18 4:40 ` Peter Xu
2016-02-18 16:52 ` Andrew Jones
2016-02-18 17:10 ` Andrea Bolognani
2016-02-19 1:55 ` Peter Xu
2016-02-19 12:33 ` Andrea Bolognani
2016-02-22 1:35 ` Peter Xu
2016-02-29 16:30 ` Andrea Bolognani
2016-03-01 2:19 ` Peter Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160215093539.GD15724@wheatley \
--to=mkletzan@redhat.com \
--cc=abologna@redhat.com \
--cc=drjones@redhat.com \
--cc=libvir-list@redhat.com \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=wei@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).