Version 2 of this series includes changes I've requested in the review
and much more that I've learned during adaptation and testing:

 - 'usb-bot' and 'usb-storage' are not ABI compatible for CDROMs

   Migrating a guest from 'usb-bot'(with cdrom) to 'usb-storage' results
   in I/O errors on reads with linux guest.

   This required adding compatibility layer - exposing the model in -xml
   and corresponding post-parse and migratable XML config
 
   This patchset still tries as much as possible to use the 'usb-bot'
   device for cdroms to fix the definition

 - more tests
 - keeping of 'usb-storage' support
 - XML config and documentation
 - cleanup of the code


The necessary logic is explained in the patches as comments.

Akihiko Odaki (2):
  qemu_capabilities: Introduce QEMU_CAPS_DEVICE_USB_BOT
  qemu: Replace usb-storage with usb-bot

Peter Krempa (11):
  qemuhotplugtest: Use VIR_DOMAIN_DEF_PARSE_ABI_UPDATE for
    virDomainDeviceDefParse
  qemuxmlconftest: Test various combinations of config
  qemusecuritytest: Use 'disk-usb-device' case instead of
    'disk-cdrom-bus-other'
  qemuxmlconftest: Drop 'disk-cdrom-bus-other'
  qemuxmlconftest: Distribute testing of 'removable' disk property
  qemuxmlconftest: Invoke "disk-usb-device" case also without
    QEMU_CAPS_DEVICE_USB_BOT and with ABI_UPDATE
  conf: introduce usb disk models 'usb-storage' and 'usb-bot'
  qemu: Fill in model of 'usb' disks to preserve ABI compatibility
  qemuBuildDeviceAddresDriveProps: Prepare for 'drive' address for
    usb-bot disks
  qemu: monitor: Introduce 'qemuMonitorSetUSBDiskAttached'
  qemuxmlconftest: Prepare for proper testing in 'disk-cdrom-usb-empty'

 docs/formatdomain.rst                         |  23 +++-
 src/conf/domain_conf.c                        |   2 +
 src/conf/domain_conf.h                        |   3 +
 src/conf/schemas/domaincommon.rng             |   2 +
 src/qemu/qemu_alias.c                         |  20 ++-
 src/qemu/qemu_capabilities.c                  |   7 +-
 src/qemu/qemu_capabilities.h                  |   3 +
 src/qemu/qemu_command.c                       | 101 ++++++++++++--
 src/qemu/qemu_command.h                       |   5 +
 src/qemu/qemu_domain.c                        |  21 +++
 src/qemu/qemu_domain_address.c                |   2 +
 src/qemu/qemu_hotplug.c                       |  18 +++
 src/qemu/qemu_monitor.c                       |  12 ++
 src/qemu/qemu_monitor.h                       |   3 +
 src/qemu/qemu_monitor_json.c                  |  20 +++
 src/qemu/qemu_monitor_json.h                  |   5 +
 src/qemu/qemu_postparse.c                     |  49 ++++++-
 src/qemu/qemu_postparse.h                     |   4 +-
 src/qemu/qemu_validate.c                      |  37 +++++-
 tests/qemublocktest.c                         |  13 +-
 .../caps_10.0.0_aarch64.xml                   |   1 +
 .../caps_10.0.0_ppc64.xml                     |   1 +
 .../caps_10.0.0_s390x.xml                     |   1 +
 .../caps_10.0.0_x86_64+amdsev.xml             |   1 +
 .../caps_10.0.0_x86_64.xml                    |   1 +
 .../qemucapabilitiesdata/caps_6.2.0_ppc64.xml |   1 +
 .../caps_6.2.0_x86_64.xml                     |   1 +
 .../qemucapabilitiesdata/caps_7.0.0_ppc64.xml |   1 +
 .../caps_7.0.0_x86_64.xml                     |   1 +
 .../qemucapabilitiesdata/caps_7.1.0_ppc64.xml |   1 +
 .../caps_7.1.0_x86_64.xml                     |   1 +
 tests/qemucapabilitiesdata/caps_7.2.0_ppc.xml |   1 +
 .../caps_7.2.0_x86_64+hvf.xml                 |   1 +
 .../caps_7.2.0_x86_64.xml                     |   1 +
 .../caps_8.0.0_x86_64.xml                     |   1 +
 .../qemucapabilitiesdata/caps_8.1.0_s390x.xml |   1 +
 .../caps_8.1.0_x86_64.xml                     |   1 +
 .../caps_8.2.0_aarch64.xml                    |   1 +
 .../caps_8.2.0_armv7l.xml                     |   1 +
 .../caps_8.2.0_loongarch64.xml                |   1 +
 .../qemucapabilitiesdata/caps_8.2.0_s390x.xml |   1 +
 .../caps_8.2.0_x86_64.xml                     |   1 +
 .../caps_9.0.0_x86_64.xml                     |   1 +
 .../caps_9.1.0_riscv64.xml                    |   1 +
 .../qemucapabilitiesdata/caps_9.1.0_s390x.xml |   1 +
 .../caps_9.1.0_x86_64.xml                     |   1 +
 .../caps_9.2.0_aarch64+hvf.xml                |   1 +
 .../qemucapabilitiesdata/caps_9.2.0_s390x.xml |   1 +
 .../caps_9.2.0_x86_64+amdsev.xml              |   1 +
 .../caps_9.2.0_x86_64.xml                     |   1 +
 tests/qemuhotplugtest.c                       |   8 +-
 .../qemuhotplug-base-live+cdrom-usb.xml       |   2 +-
 .../qemuhotplug-base-live+disk-usb.xml        |   2 +-
 tests/qemusecuritytest.c                      |   2 +-
 .../disk-cache.x86_64-latest.xml              |   2 +-
 .../qemuxmlconfdata/disk-cdrom-bus-other.xml  |  30 -----
 ...m-usb-empty.x86_64-latest.abi-update.args} |   4 +-
 ...om-usb-empty.x86_64-latest.abi-update.xml} |   6 +-
 .../disk-device-removable.x86_64-latest.args  |  40 ------
 .../qemuxmlconfdata/disk-device-removable.xml |  32 -----
 .../disk-scsi.x86_64-latest.args              |   2 +-
 tests/qemuxmlconfdata/disk-scsi.xml           |   2 +-
 .../disk-usb-device-model.x86_64-latest.args  |  48 +++++++
 ...> disk-usb-device-model.x86_64-latest.xml} |  46 ++++---
 .../qemuxmlconfdata/disk-usb-device-model.xml |  46 +++++++
 ...est.QEMU_CAPS_DEVICE_USB_BOT-disabled.args |  59 +++++++++
 ...test.QEMU_CAPS_DEVICE_USB_BOT-disabled.xml | 107 +++++++++++++++
 ...ate.QEMU_CAPS_DEVICE_USB_BOT-disabled.args |  59 +++++++++
 ...date.QEMU_CAPS_DEVICE_USB_BOT-disabled.xml | 125 ++++++++++++++++++
 ...k-usb-device.x86_64-latest.abi-update.args |  63 +++++++++
 ...sk-usb-device.x86_64-latest.abi-update.xml | 125 ++++++++++++++++++
 .../disk-usb-device.x86_64-latest.args        |  30 ++++-
 .../disk-usb-device.x86_64-latest.xml         |  82 ++++++++++--
 tests/qemuxmlconfdata/disk-usb-device.xml     |  66 ++++++++-
 tests/qemuxmlconftest.c                       |  16 ++-
 75 files changed, 1197 insertions(+), 187 deletions(-)
 delete mode 100644 tests/qemuxmlconfdata/disk-cdrom-bus-other.xml
 rename tests/qemuxmlconfdata/{disk-cdrom-bus-other.x86_64-latest.args => 
disk-cdrom-usb-empty.x86_64-latest.abi-update.args} (84%)
 rename tests/qemuxmlconfdata/{disk-cdrom-bus-other.x86_64-latest.xml => 
disk-cdrom-usb-empty.x86_64-latest.abi-update.xml} (89%)
 delete mode 100644 
tests/qemuxmlconfdata/disk-device-removable.x86_64-latest.args
 delete mode 100644 tests/qemuxmlconfdata/disk-device-removable.xml
 create mode 100644 
tests/qemuxmlconfdata/disk-usb-device-model.x86_64-latest.args
 rename tests/qemuxmlconfdata/{disk-device-removable.x86_64-latest.xml => 
disk-usb-device-model.x86_64-latest.xml} (56%)
 create mode 100644 tests/qemuxmlconfdata/disk-usb-device-model.xml
 create mode 100644 
tests/qemuxmlconfdata/disk-usb-device.x86_64-latest.QEMU_CAPS_DEVICE_USB_BOT-disabled.args
 create mode 100644 
tests/qemuxmlconfdata/disk-usb-device.x86_64-latest.QEMU_CAPS_DEVICE_USB_BOT-disabled.xml
 create mode 100644 
tests/qemuxmlconfdata/disk-usb-device.x86_64-latest.abi-update.QEMU_CAPS_DEVICE_USB_BOT-disabled.args
 create mode 100644 
tests/qemuxmlconfdata/disk-usb-device.x86_64-latest.abi-update.QEMU_CAPS_DEVICE_USB_BOT-disabled.xml
 create mode 100644 
tests/qemuxmlconfdata/disk-usb-device.x86_64-latest.abi-update.args
 create mode 100644 
tests/qemuxmlconfdata/disk-usb-device.x86_64-latest.abi-update.xml

-- 
2.49.0

Reply via email to