]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: prefer 00:1D.x and 00:1A.x for USB2 controllers on Q35
authorLaine Stump <laine@laine.org>
Wed, 21 Oct 2015 19:08:49 +0000 (15:08 -0400)
committerLaine Stump <laine@laine.org>
Mon, 11 Jan 2016 18:04:17 +0000 (13:04 -0500)
commit163338ec28857a5c61b38be5b3bf6c52c8b63877
tree1da8b5c57be6123689d7f924d9b6fc5b3d178602
parent7dbb5fce069def821226bc820986fedb608e7f1f
qemu: prefer 00:1D.x and 00:1A.x for USB2 controllers on Q35

The real Q35 machine puts the first USB controller set (EHCI+(UHCIx4))
on bus 0 slot 0x1D, and the 2nd USB controller set on bus 0 slot 0x1A,
so let's attempt to make the virtual machine match that for
controllers with auto-assigned addresses when possible.

Three test cases were added to assure that the proper addresses are
assigned - one with a single set of unaddressed USB controllers, one
with 3 (to grab both preferred slots plus one more), and one with the
order of the controller definitions reordered, to assure that the
auto-assignment isn't mixed up by order.
12 files changed:
src/qemu/qemu_command.c
tests/qemuxml2argvdata/qemuxml2argv-q35-usb2-multi.args [new file with mode: 0644]
tests/qemuxml2argvdata/qemuxml2argv-q35-usb2-multi.xml [new file with mode: 0644]
tests/qemuxml2argvdata/qemuxml2argv-q35-usb2-reorder.args [new file with mode: 0644]
tests/qemuxml2argvdata/qemuxml2argv-q35-usb2-reorder.xml [new file with mode: 0644]
tests/qemuxml2argvdata/qemuxml2argv-q35-usb2.args [new file with mode: 0644]
tests/qemuxml2argvdata/qemuxml2argv-q35-usb2.xml [new file with mode: 0644]
tests/qemuxml2argvtest.c
tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-usb2-multi.xml [new file with mode: 0644]
tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-usb2-reorder.xml [new file with mode: 0644]
tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-usb2.xml [new file with mode: 0644]
tests/qemuxml2xmltest.c