[libvirt] [Qemu-devel] [RFC PATCH 0/2] ARM: add QMP command to query GIC version

Markus Armbruster armbru at redhat.com
Mon Feb 15 15:08:33 UTC 2016

Peter Xu <peterx at redhat.com> writes:

> On Mon, Feb 15, 2016 at 10:52:01AM +0100, Markus Armbruster wrote:
>> Peter Xu <peterx at redhat.com> writes:
>> > 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.
>> Adding ad hoc queries as we go won't scale.  Is there really no generic
>> way to get this information, e.g. with qom-get?
> Haven't used "qom-get" before, but it seems to fetch one property
> for a specific object. If so, will it be strange to hide some
> capability bits into every GIC objects (though there is possibly
> one object)?

Pardon my ignorance...  what are these "GIC objects"?

What exactly is the "GIC type", and how would the result of
query-gic-capability be used?

> I agree that we should keep the interface as simple as
> possible. I see that there are already commands that works just like
> this one, which is to query some capabilities from QEMU, like:
> - query-dump-guest-memory-capability
> - query-migrate-capabilities

I'm not saying we must not add another ad hoc query.  I'm trying to
figure out whether existing generic infrastructure can serve, or be
adapted to serve.  Once we establish the answer is "no" or "badly", I'm
willing to consider the ad hoc query.

> So... besides the original proposal, what about adding a generic QMP
> command to query all kinds of capabilities (and let GIC be the first
> item)? Or any other way to avoid adding a new command?


More information about the libvir-list mailing list