[libvirt] [PATCH 0/9] qemu: assign addresses to USB devices

Ján Tomko jtomko at redhat.com
Wed Aug 12 14:52:10 UTC 2015


For https://bugzilla.redhat.com/show_bug.cgi?id=1215968

For domains started without the addresses specified on the command line,
QEMU makes up the addresses and adds USB hubs if the device is added
to the second-to-last USB port.
A domain started with these exact ports and hubs specified on the command line
is not compatible with this domain.

This series only generates the addresses for new domains, to avoid breaking
migrating already existing domains.

Ján Tomko (9):
  Remove dead code from qemuDomainAttachControllerDevice
  Remove unused virDomainVirtioSerialAddrSetRemoveController
  Store USB port path as an array of integers
  Add newDomain parameter to qemuDomainAssignAddresses
  Introduce virDomainUSBAddressSet
  Add functions for adding usb controllers to addrs
  Reserve existing USB addresses
  Assign addresses to USB devices
  Assign addresses on USB device hotplug

 src/conf/domain_addr.c                             | 406 +++++++++++++++++++--
 src/conf/domain_addr.h                             |  53 ++-
 src/conf/domain_conf.c                             |  29 +-
 src/conf/domain_conf.h                             |   4 +-
 src/libvirt_private.syms                           |  10 +-
 src/qemu/qemu_command.c                            | 235 +++++++++++-
 src/qemu/qemu_command.h                            |   3 +-
 src/qemu/qemu_domain.h                             |   1 +
 src/qemu/qemu_driver.c                             |  22 +-
 src/qemu/qemu_hotplug.c                            |  57 ++-
 src/qemu/qemu_process.c                            |   6 +-
 tests/qemuhotplugtest.c                            |   2 +-
 ...qemuhotplug-console-compat-2+console-virtio.xml |   4 +-
 .../qemuhotplug-hotplug-base+disk-usb.xml          |   1 +
 .../qemuxml2argvdata/qemuxml2argv-bios-nvram.args  |   2 +-
 tests/qemuxml2argvdata/qemuxml2argv-bios.args      |   2 +-
 .../qemuxml2argv-console-compat-2.xml              |   4 +-
 .../qemuxml2argv-controller-order.args             |   7 +-
 .../qemuxml2argv-controller-order.xml              |   2 +
 .../qemuxml2argv-disk-usb-device-removable.args    |   3 +-
 .../qemuxml2argv-disk-usb-device.args              |   3 +-
 .../qemuxml2argv-graphics-spice-timeout.args       |   2 +-
 ...muxml2argv-hostdev-usb-address-device-boot.args |   2 +-
 .../qemuxml2argv-hostdev-usb-address-device.args   |   3 +-
 .../qemuxml2argv-hugepages-numa.args               |   2 +-
 .../qemuxml2argv-input-usbmouse-addr.args          |   2 +-
 .../qemuxml2argv-input-usbmouse-addr.xml           |   2 +-
 .../qemuxml2argv-pseries-usb-kbd.args              |   2 +-
 .../qemuxml2argv-serial-spiceport.args             |   2 +-
 .../qemuxml2argv-smartcard-controller.args         |   2 +-
 .../qemuxml2argv-smartcard-host-certificates.args  |   2 +-
 .../qemuxml2argv-smartcard-host.args               |   2 +-
 ...emuxml2argv-smartcard-passthrough-spicevmc.args |   3 +-
 .../qemuxml2argv-smartcard-passthrough-tcp.args    |   2 +-
 .../qemuxml2argv-sound-device.args                 |   2 +-
 .../qemuxml2argv-usb-hub-conflict.xml              |  22 ++
 .../qemuxml2argv-usb-port-autoassign.args          |  15 +
 .../qemuxml2argv-usb-port-autoassign.xml           |  27 ++
 tests/qemuxml2argvtest.c                           |  11 +-
 tests/qemuxmlnstest.c                              |   2 +-
 40 files changed, 854 insertions(+), 109 deletions(-)
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-usb-hub-conflict.xml
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-usb-port-autoassign.args
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-usb-port-autoassign.xml

-- 
2.4.6




More information about the libvir-list mailing list