Fixes:
https://bugzilla.redhat.com/show_bug.cgi?id=1076708
https://bugzilla.redhat.com/show_bug.cgi?id=890606
New in v3:
* preserve the behavior of honoring the controller if a partial address is specified:
<address type='virtio-serial' controller='2'/>
* automatically add a controller if we're out of free ports
and add a test for it
Ján Tomko (6):
Add test for virtio serial port assignment
Add functions to track virtio-serial addresses
Allocate virtio-serial addresses when starting a domain
Expand the address set when attaching a virtio-serial controller
Assign an address when hotplugging a virtio-serial device
Auto add virtio-serial controllers
src/conf/domain_addr.c | 435 +++++++++++++++++++++
src/conf/domain_addr.h | 61 +++
src/conf/domain_conf.c | 48 +--
src/conf/domain_conf.h | 1 +
src/libvirt_private.syms | 11 +
src/qemu/qemu_command.c | 63 +++
src/qemu/qemu_domain.c | 1 +
src/qemu/qemu_domain.h | 1 +
src/qemu/qemu_hotplug.c | 32 +-
src/qemu/qemu_process.c | 2 +
tests/qemuhotplugtest.c | 2 +-
.../qemuxml2argv-channel-virtio-auto.args | 2 +-
.../qemuxml2argv-channel-virtio-autoadd.args | 33 ++
.../qemuxml2argv-channel-virtio-autoadd.xml | 45 +++
.../qemuxml2argv-channel-virtio-autoassign.args | 20 +
.../qemuxml2argv-channel-virtio-autoassign.xml | 50 +++
tests/qemuxml2argvtest.c | 4 +
.../qemuxml2xmlout-channel-virtio-auto.xml | 9 +-
18 files changed, 777 insertions(+), 43 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-channel-virtio-autoadd.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-channel-virtio-autoadd.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-channel-virtio-autoassign.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-channel-virtio-autoassign.xml