Re: [PATCH 5/7] qemu: Always enable GIC on ARM virt machines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 2016-02-07 at 09:42 -0500, John Ferlan wrote:
> On 02/03/2016 03:26 PM, Andrea Bolognani wrote:
> > GIC is always available to ARM virt machines, and the domain XML should
> > reflect this fact.
> > ---
> >  src/qemu/qemu_domain.c                                     | 14 ++++++++++++++
> >  .../qemuxml2argv-aarch64-aavmf-virtio-mmio.xml             |  1 +
> >  2 files changed, 15 insertions(+)
> > 
> > diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
> > index d120e15..5017cbb 100644
> > --- a/src/qemu/qemu_domain.c
> > +++ b/src/qemu/qemu_domain.c
> > @@ -1241,6 +1241,20 @@ qemuDomainDefAddDefaultDevices(virDomainDefPtr def,
> >  static int
> >  qemuDomainDefAddDefaultFeatures(virDomainDefPtr def)
> >  {
> > +    switch (def->os.arch) {
> > +    case VIR_ARCH_ARMV7L:
> > +    case VIR_ARCH_AARCH64:
> > +        if (STREQ(def->os.machine, "virt") ||
> > +            STRPREFIX(def->os.machine, "virt-")) {
> > +            /* GIC is always available to ARM virt machines */
> > +            def->features[VIR_DOMAIN_FEATURE_GIC] = VIR_TRISTATE_SWITCH_ON;
> 
> See once on - we then have a version='host' and we're good to go.
> 
> Of course, as I'm typing I realize that we wouldn't print out
> version='host' if it were the default...  But that may not be a bad
> thing - although we could.

That was pretty much the issue :)

For existing guests, <gic/> means <gic version='2'/>, but we pick the
default every single time the XML is loaded instead of explicitly
writing it out in the XML. Which was probably a mistake, because now
we can't really change the default without affecting existing guests :(

On the other hand, QEMU defaults to version 2 as well, so it kinda
fits nicely I guess?

Point is, I think keeping the default to version 2 in libvirt and
have upper layers (eg. virt-install via libosinfo) pick a better
value when creating new guests is in line with how we do a lot of
other stuff in libvirt.

Cheers.

-- 
Andrea Bolognani
Software Engineer - Virtualization Team

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]