]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Add the port allocation logic for isa-serial devices.
authorDivya Garg <divya.garg@nutanix.com>
Thu, 13 Jan 2022 07:33:40 +0000 (23:33 -0800)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 14 Jan 2022 14:41:57 +0000 (15:41 +0100)
commit11ddab1daf7ba0f5593d8dafdf6584acfd50433a
tree5d1fce3a3050d1042836a09e2af93c1b9d7298d1
parentd8f6e198bfaa10db7387d32580fced68fea1574b
Add the port allocation logic for isa-serial devices.

This commit takes care of following cases:
-> Check availability of requested ports.
  ->The total number of requested ports should not be more than
    VIR_MAX_ISA_SERIAL_PORTS.
  ->The ports requested should be less than VIR_MAX_ISA_SERIAL_PORTS.
  ->VIR_MAX_ISA_SERIAL_PORTS should correspond to MAX_ISA_SERIAL_PORTS
    specified in QEMU code commit def337ffda34d331404bd7f1a42726b71500df22.
-> Prevent duplicate device assignments to the same port.
-> In case no ports are provided in the XML, this patch scans the list of unused
   isa-serial indices to automatically assign available ports for this VM.

Signed-off-by: Divya Garg <divya.garg@nutanix.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/conf/domain_conf.c
src/conf/domain_conf.h
tests/qemuhotplugtestdomains/qemuhotplug-console-compat-2-live+console-virtio.xml
tests/qemuhotplugtestdomains/qemuhotplug-console-compat-2-live.xml
tests/qemuxml2argvdata/serial-tcp-tlsx509-chardev-notls.xml
tests/qemuxml2argvdata/serial-tcp-tlsx509-chardev-verify.xml
tests/qemuxml2argvdata/serial-tcp-tlsx509-chardev.xml
tests/qemuxml2argvdata/serial-tcp-tlsx509-secret-chardev.xml
tests/qemuxml2xmloutdata/serial-tcp-tlsx509-chardev.xml