[libvirt] [PATCH v2 2/4] qemu: Use generic PCIe Root Ports by default when available
Andrea Bolognani
abologna at redhat.com
Fri Mar 17 09:06:33 UTC 2017
On Thu, 2017-03-16 at 18:30 -0400, Laine Stump wrote:
> > @@ -1861,7 +1863,12 @@ qemuDomainPCIControllerSetDefaultModelName(virDomainControllerDefPtr cont)
> > *modelName = VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_I82801B11_BRIDGE;
> > break;
> > case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT_PORT:
> > - *modelName = VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_IOH3420;
> > + /* Use generic PCIe Root Ports if available, falling back to
> > + * ioh3420 otherwise */
> > + if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_PCIE_ROOT_PORT))
> > + *modelName = VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_PCIE_ROOT_PORT;
> > + else
> > + *modelName = VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_IOH3420;
>
> I wonder if we should check caps for IOH3420 here just to be consistent
> (and log an error if neither is available). I realize that's not the way
> it worked before (existing code only checks the caps for a particular
> device at the time we generate the commandline), but I'll be the first
> to admit my original code was, err, "less than ideal".
>
> It's up to you though, add it or not.
We already check when building the QEMU command line, which
is the appropriate place IMHO. I'd rather not duplicate the
check here as well.
I've pushed the patches now, thanks for reviewing!
--
Andrea Bolognani / Red Hat / Virtualization
More information about the libvir-list
mailing list