On Sun, 29 Aug 2021 16:25:53 -0400
Laine Stump <laine(a)redhat.com> wrote:
I just looked back at the code that decides whether a device is
conventional PCI or PCIe for the first time in a few years
(virPCIDeviceInit) and it looks like it might consider integrated
chipset devices to be conventional PCI (since they don't have any
"Express Capabilities Data"); this would explain why it's wanting to
assign it to a pcie-to-pci-bridge. Maybe we should just always assign
devices to PCIe slots when the guest is Q35 though. Alex - what's your
opinion about this?
The only certainty is that you're going to be wrong sometimes.
Technically all PCIe devices should have a PCIe capability, but that's
commonly not the case for Root Complex Integrated Endpoints, presumably
because the PCIe capability also describes PCIe links but integrated
endpoints don't expose such aspects of how they're connected to the RC.
So, if you assume these are conventional PCI devices, you're probably
wrong and if you assume they're PCIe devices, well they don't have a
PCIe capability like they really ought to if they're under a downstream
port. We just hope that software doesn't care in that case.
Would libvirt want a special rule for hostdev devices on the host root
bus? If you were to set the default location for any such device to
the guest root bus then your rules about config space size for
determining conventional vs express become more consistent for the
remaining devices. But then, do we have root bus hotplug on q35?
Thanks,
Alex