From d760255d01315f0d688c56ce340773bbac87836c Mon Sep 17 00:00:00 2001 From: "J.B. Joret" Date: Mon, 7 Jan 2013 18:17:14 +0100 Subject: [PATCH] S390: Add SCLP console front end support The SCLP console is the native console type for s390 and is preferred over the virtio console as it doesn't require special drivers and is more efficient. Recent versions of QEMU come with SCLP support which is hereby enabled. The new target types 'sclp' and 'sclplm' can be used to specify a SCLP console. Adding documentation, domain schema and XML processing support. Signed-off-by: J.B. Joret Signed-off-by: Viktor Mihajlovski --- docs/formatdomain.html.in | 19 ++++++++++++++++++- docs/schemas/domaincommon.rng | 2 ++ src/conf/domain_conf.c | 4 +++- src/conf/domain_conf.h | 2 ++ 4 files changed, 25 insertions(+), 2 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 977497af29..c5725e5d3a 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -3701,7 +3701,7 @@ qemu-kvm -net nic,model=? /dev/null

    -
  • If no targetType attribue is set, then the default +
  • If no targetType attribute is set, then the default device type is according to the hypervisor's rules. The default type will be added when re-querying the XML fed into libvirt. For fully virtualized guests, the default device type will usually @@ -3715,6 +3715,12 @@ qemu-kvm -net nic,model=? /dev/null
  • Only the first console element may use a targetType of serial. Secondary consoles must all be paravirtualized.
  • +
  • On s390, the console element may use a + targetType of sclp or sclplm + (line mode). SCLP is the native console type for s390. There's no + controller associated to SCLP consoles. + Since 1.0.2 +

@@ -3740,6 +3746,17 @@ qemu-kvm -net nic,model=? /dev/null </devices> ... +

+  ...
+  <devices>
+    <!-- KVM s390 sclp console -->
+    <console type='pty'>
+      <source path='/dev/pts/1'/>
+      <target type='sclp' port='0'/>
+    </console>
+  </devices>
+  ...
+

If the console is presented as a serial port, the target element has the same attributes as for a serial port. There is usually diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 7a9778159f..be121023ab 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -2467,6 +2467,8 @@ virtio lxc openvz + sclp + sclplm diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index b2bc57a7bd..b3a35b737c 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -355,7 +355,9 @@ VIR_ENUM_IMPL(virDomainChrConsoleTarget, "uml", "virtio", "lxc", - "openvz") + "openvz", + "sclp", + "sclplm") VIR_ENUM_IMPL(virDomainChrDevice, VIR_DOMAIN_CHR_DEVICE_TYPE_LAST, "parallel", diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index d825a24378..4284caf6b3 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -933,6 +933,8 @@ enum virDomainChrConsoleTargetType { VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_VIRTIO, VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_LXC, VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_OPENVZ, + VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SCLP, + VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SCLPLM, VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_LAST };