]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: don't assume slot 0 is unused/reserved.
authorLaine Stump <laine@laine.org>
Wed, 21 Oct 2015 18:49:06 +0000 (14:49 -0400)
committerLaine Stump <laine@laine.org>
Mon, 11 Jan 2016 17:58:40 +0000 (12:58 -0500)
commit7dbb5fce069def821226bc820986fedb608e7f1f
tree47df679785665dcf675635cb9b54d7375e13cb45
parent2b6f6ad64b70f3e5d874a2cfd72a7ecb5fe86a5b
qemu: don't assume slot 0 is unused/reserved.

When qemuAssignDevicePCISlots() is looking for companion controllers
for a USB controller that has no PCI address specified, it initializes
a virDevicePCIAddress to 0000:00:00.0, fills it in with the
companion's address if one is found, then checks whether or not there
was a find based on slot == 0. On a system with a single PCI bus, that
is a valid way to check, because slot 0 is reserved, but on most other
PCI buses, slot 0 is not reserved, and is open for use by any
device. This patch adds a separate bool that is set when a companion
is found rather than relying on the faulty information provided with
"slot == 0".
src/qemu/qemu_command.c