[libvirt] [Qemu-devel] ARM KVM GICv3 Support
peter.maydell at linaro.org
Tue Feb 2 15:50:34 UTC 2016
On 2 February 2016 at 15:09, Andrea Bolognani <abologna at redhat.com> wrote:
> Hold on, so "gic-version=3" means "support all GIC versions up to 3",
> not "support GIC version 3 only"? I thought the latter.
In the current implemented syntax, it means "expose a version 3 GIC
to the guest". You can't simultaneously give the guest a GICv3 and a GICv2.
Whether the host actually supports our doing this is the thing we
can test at runtime (and currently handle by making vm creation fail
if you asked for something the host can't do, just as we do if you
say '-cpu cortex-a57' on a non-A57 host).
>> > > 2) Just implement something in libvirt that checks what the kernel
>> > > supports directly via the well-defined KVM interface and chooses
>> > > the highest supported version per default.
>> I'm not familiar enough with libvirt, nor the use of QMP, to really argue
>> one way or another, but I find it a bit strange that we'd prefer libvirt
>> to query two entities over one. And, why should the libvirt installed on
>> a particular host prefer gicv3 as the default, just because KVM supports
>> it, even when QEMU does not? The default will fail every time until QEMU
>> is upgraded, which may not be necessary/desired.
> Shouldn't the default be "host", to mean "whatever the host supports",
> rather than a specific version based either on host or QEMU probing?
> That should work for every QEMU version, right?
For the existing default, the horse has already bolted. The default
(from QEMU's POV) is "2", because this retains command line compatibility
with old command lines, which didn't specify because the option didn't
exist and which assume the guest will be given a GICv2.
(This also makes the handling of -gic-version match -cpu : if you
don't specify you get a default which you might or might not want
but which is the same thing it's always been, ie A15 and GICv2;
if you want 'host' you must specify it; 'host' doesn't work for
TCG, only KVM.)
More information about the libvir-list