[PATCHv3 1/2] S390: Add SCLP console front end support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "J.B. Joret" <jb@xxxxxxxxxxxxxxxxxx>

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 <jb@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Viktor Mihajlovski <mihajlov@xxxxxxxxxxxxxxxxxx>
---
 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 c81af8a..082018f 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -3624,7 +3624,7 @@ qemu-kvm -net nic,model=? /dev/null
     </p>
 
     <ul>
-      <li>If no <code>targetType</code> attribue is set, then the default
+      <li>If no <code>targetType</code> 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
@@ -3638,6 +3638,12 @@ qemu-kvm -net nic,model=? /dev/null
       <li>Only the first <code>console</code> element may use a <code>targetType</code>
         of <code>serial</code>. Secondary consoles must all be paravirtualized.
       </li>
+      <li>On s390, the <code>console</code> element may use a
+        <code>targetType</code> of <code>sclp</code> or <code>sclplm</code>
+        (line mode). SCLP is the native console type for s390. There's no
+        controller associated to SCLP consoles.
+        <span class="since">Since 1.0.1</span>
+      </li>
     </ul>
 
     <p>
@@ -3663,6 +3669,17 @@ qemu-kvm -net nic,model=? /dev/null
   &lt;/devices&gt;
   ...</pre>
 
+<pre>
+  ...
+  &lt;devices&gt;
+    &lt;!-- KVM s390 sclp console --&gt;
+    &lt;console type='pty'&gt;
+      &lt;source path='/dev/pts/1'/&gt;
+      &lt;target type='sclp' port='0'/&gt;
+    &lt;/console&gt;
+  &lt;/devices&gt;
+  ...</pre>
+
     <p>
       If the console is presented as a serial port, the <code>target</code>
       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 14344e2..f483c4e 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -2441,6 +2441,8 @@
         <value>virtio</value>
         <value>lxc</value>
         <value>openvz</value>
+        <value>sclp</value>
+        <value>sclplm</value>
       </choice>
     </attribute>
   </define>
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 6aa5f79..e0eded2 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -350,7 +350,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 7ad5377..a31793b 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -905,6 +905,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
 };
-- 
1.7.12.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]