Hi,
this is the patch to add support for multiple serial ports to the
libvirt Xen driver. It support both old style (serial = "pty") and
new style (serial = [ "/dev/ttyS0", "/dev/ttyS1" ]) definition and
tests for xml2sexpr, sexpr2xml and xmconfig have been added as well.
Written and tested on RHEL-5 Xen dom0 and working as designed but
the Xen version have to have patch for RHBZ #614004 but this patch
is for upstream version of libvirt.
Also, this patch is addressing issue described in RHBZ #670789.
Differences between v2 and v3:
* Fixed handling of port number in virDomainChrDefParseTargetXML()
* Fixed serial port handling if we have definition of device in non-zero port number
* Added second test for first port undefined (i.e. port value > 0 for just one
serial port)
Michal
Signed-off-by: Michal Novotny <minovotn(a)redhat.com>
Michal Novotny (2):
Fix virDomainChrDefParseTargetXML() to parse the target port if
available
Add support for multiple serial ports into the Xen driver
src/conf/domain_conf.c | 7 +-
src/xen/xend_internal.c | 86 ++++++++++--
src/xen/xm_internal.c | 137 ++++++++++++++++---
.../sexpr2xml-fv-serial-dev-2-ports.sexpr | 1 +
.../sexpr2xml-fv-serial-dev-2-ports.xml | 53 ++++++++
.../sexpr2xml-fv-serial-dev-2nd-port.sexpr | 1 +
.../sexpr2xml-fv-serial-dev-2nd-port.xml | 49 +++++++
tests/sexpr2xmltest.c | 2 +
.../test-fullvirt-serial-dev-2-ports.cfg | 25 ++++
.../test-fullvirt-serial-dev-2-ports.xml | 55 ++++++++
.../test-fullvirt-serial-dev-2nd-port.cfg | 25 ++++
.../test-fullvirt-serial-dev-2nd-port.xml | 53 ++++++++
tests/xmconfigtest.c | 2 +
.../xml2sexpr-fv-serial-dev-2-ports.sexpr | 1 +
.../xml2sexpr-fv-serial-dev-2-ports.xml | 44 +++++++
.../xml2sexpr-fv-serial-dev-2nd-port.sexpr | 1 +
.../xml2sexpr-fv-serial-dev-2nd-port.xml | 40 ++++++
tests/xml2sexprtest.c | 2 +
18 files changed, 546 insertions(+), 38 deletions(-)
create mode 100644 tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2-ports.sexpr
create mode 100644 tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2-ports.xml
create mode 100644 tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2nd-port.sexpr
create mode 100644 tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2nd-port.xml
create mode 100644 tests/xmconfigdata/test-fullvirt-serial-dev-2-ports.cfg
create mode 100644 tests/xmconfigdata/test-fullvirt-serial-dev-2-ports.xml
create mode 100644 tests/xmconfigdata/test-fullvirt-serial-dev-2nd-port.cfg
create mode 100644 tests/xmconfigdata/test-fullvirt-serial-dev-2nd-port.xml
create mode 100644 tests/xml2sexprdata/xml2sexpr-fv-serial-dev-2-ports.sexpr
create mode 100644 tests/xml2sexprdata/xml2sexpr-fv-serial-dev-2-ports.xml
create mode 100644 tests/xml2sexprdata/xml2sexpr-fv-serial-dev-2nd-port.sexpr
create mode 100644 tests/xml2sexprdata/xml2sexpr-fv-serial-dev-2nd-port.xml
--
1.7.3.2