]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: set/use info->pciConnectFlags when validating/assigning PCI addresses
authorLaine Stump <laine@laine.org>
Mon, 5 Sep 2016 02:14:40 +0000 (22:14 -0400)
committerLaine Stump <laine@laine.org>
Mon, 14 Nov 2016 19:06:57 +0000 (14:06 -0500)
commit7f784f576b96eee68849dff1759eefe86c534df7
tree3253bcff3ef808de1cd2a5801a45f09c1ee243e1
parentbd776c2b091610b0cecb17dbde1a2198d89079b6
qemu: set/use info->pciConnectFlags when validating/assigning PCI addresses

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