render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
c1c534
From 6fe46c6d8b1bfdd1f5d3e54798077e1db5b4180c Mon Sep 17 00:00:00 2001
c1c534
Message-Id: <6fe46c6d8b1bfdd1f5d3e54798077e1db5b4180c@dist-git>
c1c534
From: Pino Toscano <ptoscano@redhat.com>
c1c534
Date: Wed, 29 Nov 2017 16:23:16 +0100
c1c534
Subject: [PATCH] qemu: switch s390/s390x default console back to serial
c1c534
c1c534
Now that <serial> and <console> on s390/s390x behave a bit more like the
c1c534
other architectures, remove this extra differentation, and use sclp
c1c534
console by default for new guests.  New virtio consoles can still be
c1c534
added, and it is actually needed because of the limited number of
c1c534
instances for sclp and sclplm.
c1c534
c1c534
This reverts commit b1c88c14764e0b043a269d454a83a6ac7af34eac, whose
c1c534
reasons are not totally clear.
c1c534
c1c534
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
c1c534
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
c1c534
Reviewed-by: Bjoern Walk <bwalk@linux.vnet.ibm.com>
c1c534
(cherry picked from commit 220c1f70dc96b1066cefbfe50f30e3111a2ecdc6)
c1c534
c1c534
https://bugzilla.redhat.com/show_bug.cgi?id=1449265
c1c534
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
c1c534
---
c1c534
 src/qemu/qemu_domain.c                                          | 7 -------
c1c534
 tests/qemuxml2argvdata/qemuxml2argv-s390-serial-console.args    | 5 +----
c1c534
 tests/qemuxml2xmloutdata/qemuxml2xmlout-s390-defaultconsole.xml | 8 ++++++--
c1c534
 tests/qemuxml2xmloutdata/qemuxml2xmlout-s390-serial-console.xml | 6 ------
c1c534
 4 files changed, 7 insertions(+), 19 deletions(-)
c1c534
c1c534
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
c1c534
index 91c0e163e1..1b5f439621 100644
c1c534
--- a/src/qemu/qemu_domain.c
c1c534
+++ b/src/qemu/qemu_domain.c
c1c534
@@ -4255,13 +4255,6 @@ qemuDomainChrDefPostParse(virDomainChrDefPtr chr,
c1c534
                           virQEMUDriverPtr driver,
c1c534
                           unsigned int parseFlags)
c1c534
 {
c1c534
-    /* set the default console type for S390 arches */
c1c534
-    if (chr->deviceType == VIR_DOMAIN_CHR_DEVICE_TYPE_CONSOLE &&
c1c534
-        chr->targetType == VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_NONE &&
c1c534
-        ARCH_IS_S390(def->os.arch)) {
c1c534
-        chr->targetType = VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_VIRTIO;
c1c534
-    }
c1c534
-
c1c534
     /* Historically, isa-serial and the default matched, so in order to
c1c534
      * maintain backwards compatibility we map them here. The actual default
c1c534
      * will be picked below based on the architecture and machine type. */
c1c534
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-s390-serial-console.args b/tests/qemuxml2argvdata/qemuxml2argv-s390-serial-console.args
c1c534
index c405fb59ee..20968f7945 100644
c1c534
--- a/tests/qemuxml2argvdata/qemuxml2argv-s390-serial-console.args
c1c534
+++ b/tests/qemuxml2argvdata/qemuxml2argv-s390-serial-console.args
c1c534
@@ -18,8 +18,5 @@ QEMU_AUDIO_DRV=none \
c1c534
 server,nowait \
c1c534
 -mon chardev=charmonitor,id=monitor,mode=readline \
c1c534
 -boot c \
c1c534
--device virtio-serial-ccw,id=virtio-serial0,devno=fe.0.0000 \
c1c534
 -chardev pty,id=charserial0 \
c1c534
--device sclpconsole,chardev=charserial0,id=serial0 \
c1c534
--chardev pty,id=charconsole1 \
c1c534
--device virtconsole,chardev=charconsole1,id=console1
c1c534
+-device sclpconsole,chardev=charserial0,id=serial0
c1c534
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-s390-defaultconsole.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-s390-defaultconsole.xml
c1c534
index 7eb1a765ab..0f278f2c9d 100644
c1c534
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-s390-defaultconsole.xml
c1c534
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-s390-defaultconsole.xml
c1c534
@@ -14,9 +14,13 @@
c1c534
   <on_crash>destroy</on_crash>
c1c534
   <devices>
c1c534
     <emulator>/usr/bin/qemu-system-s390x</emulator>
c1c534
-    <controller type='virtio-serial' index='0'/>
c1c534
+    <serial type='pty'>
c1c534
+      <target type='sclp-serial' port='0'>
c1c534
+        <model name='sclpconsole'/>
c1c534
+      </target>
c1c534
+    </serial>
c1c534
     <console type='pty'>
c1c534
-      <target type='virtio' port='0'/>
c1c534
+      <target type='serial' port='0'/>
c1c534
     </console>
c1c534
     <memballoon model='none'/>
c1c534
     <panic model='s390'/>
c1c534
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-s390-serial-console.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-s390-serial-console.xml
c1c534
index db3023b7a6..9c9b4dd27a 100644
c1c534
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-s390-serial-console.xml
c1c534
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-s390-serial-console.xml
c1c534
@@ -14,9 +14,6 @@
c1c534
   <on_crash>destroy</on_crash>
c1c534
   <devices>
c1c534
     <emulator>/usr/bin/qemu-system-s390x</emulator>
c1c534
-    <controller type='virtio-serial' index='0'>
c1c534
-      <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0000'/>
c1c534
-    </controller>
c1c534
     <serial type='pty'>
c1c534
       <target type='sclp-serial' port='0'>
c1c534
         <model name='sclpconsole'/>
c1c534
@@ -25,9 +22,6 @@
c1c534
     <console type='pty'>
c1c534
       <target type='serial' port='0'/>
c1c534
     </console>
c1c534
-    <console type='pty'>
c1c534
-      <target type='virtio' port='0'/>
c1c534
-    </console>
c1c534
     <memballoon model='none'/>
c1c534
     <panic model='s390'/>
c1c534
   </devices>
c1c534
-- 
c1c534
2.15.1
c1c534