]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Fill in model of 'usb' disks to preserve ABI compatibility
authorPeter Krempa <pkrempa@redhat.com>
Mon, 23 Jun 2025 15:51:16 +0000 (17:51 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 24 Jun 2025 14:29:12 +0000 (16:29 +0200)
commitf08af07f83a3f21fb88c1cacafe1cd2ffc27c22d
treee2fa6ed0b5a109e0948418d9aca392a7c70a74cf
parent0d47218419949469273ade51f8fad0085d0b5572
qemu: Fill in model of 'usb' disks to preserve ABI compatibility

While 'usb-bot' and 'usb-storage' are ABI and migration compatible for
disks it's not the case for cdroms. When migrating from a new config
using 'usb-bot' to an older daemon which would use 'usb-storage' the
guest os will get I/O errors.

Thus we must properly fill in models for 'usb' disks so that cdroms can
be handled properly.

When parsing XML fill in the models and drop the appropriate models when
formatting migratable XML.

The logic is explained in comments in the code.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
src/qemu/qemu_domain.c
src/qemu/qemu_postparse.c
src/qemu/qemu_postparse.h
tests/qemublocktest.c
tests/qemuhotplugtestdomains/qemuhotplug-base-live+cdrom-usb.xml
tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-usb.xml
tests/qemuxmlconfdata/disk-cache.x86_64-latest.xml
tests/qemuxmlconfdata/disk-usb-device.x86_64-latest.QEMU_CAPS_DEVICE_USB_BOT-disabled.xml
tests/qemuxmlconfdata/disk-usb-device.x86_64-latest.abi-update.QEMU_CAPS_DEVICE_USB_BOT-disabled.xml
tests/qemuxmlconfdata/disk-usb-device.x86_64-latest.abi-update.xml
tests/qemuxmlconfdata/disk-usb-device.x86_64-latest.xml