On Tue, Jan 05, 2016 at 01:37:47PM +0100, Andrea Bolognani wrote:
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
You don't need any input to report the capabilities of a host; either it
supports only GICv2, or only GICv3, or both.
- libvirt needs to check before running the guest anyway
Why can libvirt not just run the tool and parse its output? That's what
I understood was done for other things, but perhaps I misunderstood.
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.
ok, I don't think this is a big deal to implement, but I have no idea
which interface should be used.
Could you have a look at the libvirt side of things and figure out what
is done for similar things on x86 and we can see if we can implement
something like this for ARM in QEMU?
> 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.
This is already done. If you try to create a VM which is not supported,
the system exits with an error.
Thanks,
-Christoffer