]> git.ipfire.org Git - thirdparty/libvirt.git/commit
conf: fix fromConfig argument to virDomainPCIAddressReserveAddr()
authorLaine Stump <laine@laine.org>
Sat, 22 Oct 2016 16:35:38 +0000 (12:35 -0400)
committerLaine Stump <laine@laine.org>
Wed, 11 Jan 2017 09:47:12 +0000 (04:47 -0500)
commit79901543b91073bf01d1f2d094137cb1821cc6f8
tree5d3b903e8664ced1dcd155413c9ef514db05109c
parent147ebe6ddf313b8e003aef5ad87f40497fa89cb1
conf: fix fromConfig argument to virDomainPCIAddressReserveAddr()

Although setting virDomainPCIAddressReserveAddr()'s fromConfig=true is
correct when a PCI addres is coming from a domain's config, the *true*
purpose of the fromConfig argument is to lower restrictions on what
kind of device can plug into what kind of controller - if fromConfig
is true, then a PCIE_DEVICE can plug into a slot that is marked as
only compatible with PCI_DEVICE (and vice versa), and the HOTPLUG flag
is ignored.

For a long time there have been several calls to
virDomainPCIAddressReserveAddr() that have fromConfig incorrectly set
to false - it's correct that the addresses aren't coming from user
config, but they are coming from hardcoded exceptions in libvirt that
should, if anything, pay *even less* attention to following the
pciConnectFlags (under the assumption that the libvirt programmer knew
what they were doing).

See commit b87703cf7 for an example of an actual bug caused by the
incorrect setting of the "fromConfig" argument to
virDomainPCIAddressReserveAddr(). Although they haven't resulted in
any reported bugs, this patch corrects all the other incorrect
settings of fromConfig in calls to virDomainPCIAddressReserveAddr().
src/conf/domain_addr.c
src/qemu/qemu_domain_address.c