[libvirt] [PATCH v6 03/17] qemu: set/use info->pciConnectFlags when validating/assigning PCI addresses

Andrea Bolognani abologna at redhat.com
Tue Nov 8 10:08:19 UTC 2016


On Mon, 2016-11-07 at 14:50 -0500, Laine Stump wrote:
> Set pciConnectFlags in each device's DeviceInfo and then use those
> flags later when validating existing addresses in
> qemuDomainCollectPCIAddress() and when assigning new addresses with
> qemuDomainPCIAddressReserveNextAddr() (rather than scattering the
> logic about which devices need which type of slot all over the place).
> 
> Note that the exact flags set by
> qemuDomainDeviceCalculatePCIConnectFlags() are different from the
> flags previously set manually in qemuDomainCollectPCIAddress(), but
> this doesn't matter because all validation of addresses in that case
> ignores the setting of the HOTPLUGGABLE flag, and treats PCIE_DEVICE
> and PCI_DEVICE the same (this lax checking was done on purpose,
> because there are some things that we want to allow the user to
> specify manually, e.g. assigning a PCIe device to a PCI slot, that we
> *don't* ever want libvirt to do automatically. The flag settings that
> we *really* want to match are 1) the old flag settings in
> qemuDomainAssignDevicePCISlots() (which is HOTPLUGGABLE | PCI_DEVICE
> for everything except PCI controllers) and 2) the new flag settings
> done by qemuDomainDeviceCalculatePCIConnectFlags() (which are
> currently exactly that - HOTPLUGGABLE | PCI_DEVICE for everything
> except PCI controllers).
> ---
>  src/qemu/qemu_domain_address.c | 207 +++++++++++++++--------------------------
>  1 file changed, 75 insertions(+), 132 deletions(-)

ACK

-- 
Andrea Bolognani / Red Hat / Virtualization




More information about the libvir-list mailing list