]> xenbits.xensource.com Git - libvirt.git/commit
Allocate virtio-serial addresses when starting a domain
authorJán Tomko <jtomko@redhat.com>
Mon, 2 Mar 2015 09:58:48 +0000 (10:58 +0100)
committerJán Tomko <jtomko@redhat.com>
Thu, 2 Apr 2015 13:00:13 +0000 (15:00 +0200)
commit5903378834bafb031407ab02ce37dcc9ec782d1f
tree58c46a88efdd90b3af09169e91843f01ac4c25e9
parent16db8d2ec540878b91994478c8b2b64d4b7b0a11
Allocate virtio-serial addresses when starting a domain

Instead of always using controller 0 and incrementing port number,
respect the maximum port numbers of controllers and use all of them.

Ports for virtio consoles are quietly reserved, but not formatted
(neither in XML nor on QEMU command line).

Also rejects duplicate virtio-serial addresses.
https://bugzilla.redhat.com/show_bug.cgi?id=890606
https://bugzilla.redhat.com/show_bug.cgi?id=1076708

Test changes:
* virtio-auto.args
  Filling out the port when just the controller is specified.
  switched from using
    maxport + 1
  to:
    first free port on the controller
* virtio-autoassign.args
  Filling out the address when no <address> is specified.
  Started using all the controllers instead of 0, also discards
  the bus value.
* xml -> xml output of virtio-auto
  The port assignment is no longer done as a part of XML parsing,
  so the unspecified values stay 0.
src/conf/domain_conf.c
src/conf/domain_conf.h
src/libvirt_private.syms
src/qemu/qemu_command.c
src/qemu/qemu_domain.c
src/qemu/qemu_domain.h
src/qemu/qemu_process.c
tests/qemuxml2argvdata/qemuxml2argv-channel-virtio-auto.args
tests/qemuxml2argvdata/qemuxml2argv-channel-virtio-autoassign.args
tests/qemuxml2xmloutdata/qemuxml2xmlout-channel-virtio-auto.xml