]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemuDomainDefAddDefaultDevices: Populate default USB for 'versatilepb' and 'realview...
authorPeter Krempa <pkrempa@redhat.com>
Mon, 26 Feb 2024 15:17:41 +0000 (16:17 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 6 Mar 2024 15:30:36 +0000 (16:30 +0100)
commitc6d71bf81309874ba21cc6a38c835a8871f0b896
treeb254225c08d68b588c54db7ff705720ec83cc641
parentd885d39f107a15bd35ec040b6c9ffb22ad1f70be
qemuDomainDefAddDefaultDevices: Populate default USB for 'versatilepb' and 'realview' ARM machines

The machine types historically have a default USB controller populated
via '-usb' which libvirt assumed implicitly. Qemu will use 'pci-ohci'
for both if '-usb' is used.

Unfortunately an USB controller instantiated via '-usb' is unusable as
the bus name libvirt generates doesn't reflect the real name qemu uses,
and thus no libvirt-defined USB devices can be put on the controller.

This patch will populate the default USB controller into the XML and
select it's model to 'pci-ohci' unconditionally as the machine would
fail to start with '-usb' if that controller model is not available.

This patch doesn't try to make any other assumptions about
auto-populated model of USB controllers, which means that for an
explicit USB controller without model a different model will be picked.

Note that this will likely cause ABI differences and break migration for
the two machine types, in the corner case when the default USB
controller would be populated, but given that both are obsolete board
types and USB was unusable it doesn't make sense to keep supporting this
specific case when '-usb' was formatted.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
13 files changed:
src/qemu/qemu_domain.c
tests/qemuxmlconfdata/aarch64-realview-minimal.aarch64-latest.abi-update.args
tests/qemuxmlconfdata/aarch64-realview-minimal.aarch64-latest.abi-update.xml
tests/qemuxmlconfdata/aarch64-realview-minimal.aarch64-latest.args
tests/qemuxmlconfdata/aarch64-realview-minimal.aarch64-latest.xml
tests/qemuxmlconfdata/aarch64-versatilepb-minimal.aarch64-latest.abi-update.args
tests/qemuxmlconfdata/aarch64-versatilepb-minimal.aarch64-latest.abi-update.xml
tests/qemuxmlconfdata/aarch64-versatilepb-minimal.aarch64-latest.args
tests/qemuxmlconfdata/aarch64-versatilepb-minimal.aarch64-latest.xml
tests/qemuxmlconfdata/armv7l-versatilepb-minimal.armv7l-latest.abi-update.args
tests/qemuxmlconfdata/armv7l-versatilepb-minimal.armv7l-latest.abi-update.xml
tests/qemuxmlconfdata/armv7l-versatilepb-minimal.armv7l-latest.args
tests/qemuxmlconfdata/armv7l-versatilepb-minimal.armv7l-latest.xml