On Tue, 2016-01-05 at 13:08 +0100, Christoffer Dall wrote:
On Tue, Jan 05, 2016 at 12:37:02PM +0100, Andrea Bolognani wrote:
> On Mon, 2015-12-21 at 12:03 +0100, Christoffer Dall wrote:
> >
> > So let me summarize the things we need to do:
> >
> > - patch libvirt to allow <gic version='host' />
> > - patch libvirt to properly probe for GICv2 and GICv3 support
> > - patch libvirt to generally handle virt-host-validate on ARM
> >
> > And that should be enough for other tools such as OpenStack with Nova to
> > probe and create the VMs it wishes.
> >
> > Does that about capture it?
>
> Sounds about right.
>
> I can work on points 1) and 3) of your list on my own, but for point 2)
> we need QEMU to start probing the host for supported GIC versions and
> expose such information before libvirt can use it. Then of course higher
> level tools such as OpenStack will need to become aware of these new
> features in libvirt.
>
I thought the virt-host-validate tool in libvirt should do the probing
directly?
The tool is just a convenience for the administrator (and for higher
level tools?), and it can't be where the validation happens for two
reasons:
- it doesn't take any argument, so it can't possibly know whether
you're interested in running GICv2 or GICv3 guests
- libvirt needs to check before running the guest anyway
Probing inside QEMU means libvirt can just ask it instead of
implementing the checks itself, which means less code duplication;
more importantly, this prevents the possibility of the checks ever
going out of sync.
If I misunderstood, how would you like QEMU to report this?
I'm not 100% sure about the best interface here (hopefully other people
can weigh in) but I imagine there would be some sort of QMP command that
lists the GIC versions supported by the QEMU binary, or some text in
the output of 'qemu -help' that can be parsed to obtain such list.
Should it
be the qemu binary directly or the script that Peter suggested?
I think it should be the QEMU binary, especially since I assume QEMU
itself will want to error out if an unsupported GIC version is requested
by the user - there's no guarantee QEMU will be called by libvirt, so it
will have to check on its own.
Cheers.
--
Andrea Bolognani
Software Engineer - Virtualization Team