[libvirt] [PATCH 2/2] qemu: Add Default PCI Device for arm guests

infos at nafets.de infos at nafets.de
Tue Nov 27 19:46:20 UTC 2018



> -----Ursprüngliche Nachricht-----
> Von: Andrea Bolognani <abologna at redhat.com>
> Gesendet: Montag, 26. November 2018 17:50
> An: infos at nafets.de; libvir-list at redhat.com
> Cc: Stefan Schallenberg <nafets227 at github.github.io>
> Betreff: Re: [libvirt] [PATCH 2/2] qemu: Add Default PCI Device for arm guests
> 
> On Sun, 2018-11-25 at 21:09 +0000, infos at nafets.de wrote:
> [...]
> > @@ -3267,6 +3267,15 @@
> qemuDomainDefAddDefaultDevices(virDomainDefPtr def,
> >          addDefaultMemballoon = false;
> >          if (qemuDomainIsARMVirt(def))
> >              addPCIeRoot = virQEMUCapsGet(qemuCaps,
> > QEMU_CAPS_OBJECT_GPEX);
> > +
> > +        if (!ARCH_IS_RISCV(def->os.arch) ||
> > +                    STREQ(def->os.machine, "versatilepb"))
> > +            addPCIRoot = true;
> > +
> > +        if (qemuDomainIsARMVirt(def) &&
> > +                    virQEMUCapsGet(qemuCaps, QEMU_CAPS_OBJECT_GPEX))
> > +            addPCIRoot = true;
> > +
> 
> This is not indented properly; more importantly, the logic doesn't make a whole
> lot of sense to me.
> 
> You're checking whether the arch is RISC-V in a case that you'll only hit for ARM
> architectures, and (with the second if) causing
> aarch64 virt guests to have both a pcie-root and a pci-root, which helpfully
> breaks the test suite.
The Source code is copied from qemuDomainSupportsPCI that is not accessible at this point.
Any  good suggestions how to either make qemuDomainSupportsPCI available and call it or have a better condition to check whether this machine has a default PCI?
> 
> Please ensure 'make check' and 'make syntax-check' pass after each one of your
> patches before posting.
> 
> --
> Andrea Bolognani / Red Hat / Virtualization






More information about the libvir-list mailing list