cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
Pablo Greco e6a3ae
From 19b96c7f412b9b8d893ec9ebd2603565d6afa178 Mon Sep 17 00:00:00 2001
Pablo Greco e6a3ae
From: Thomas Huth <thuth@redhat.com>
Pablo Greco e6a3ae
Date: Mon, 14 Oct 2019 10:06:31 +0100
Pablo Greco e6a3ae
Subject: [PATCH 06/21] s390-bios: decouple cio setup from virtio
Pablo Greco e6a3ae
Pablo Greco e6a3ae
RH-Author: Thomas Huth <thuth@redhat.com>
Pablo Greco e6a3ae
Message-id: <20191014100645.22862-4-thuth@redhat.com>
Pablo Greco e6a3ae
Patchwork-id: 91776
Pablo Greco e6a3ae
O-Subject: [RHEL-8.2.0 qemu-kvm PATCH v2 03/17] s390-bios: decouple cio setup from virtio
Pablo Greco e6a3ae
Bugzilla: 1664376
Pablo Greco e6a3ae
RH-Acked-by: Cornelia Huck <cohuck@redhat.com>
Pablo Greco e6a3ae
RH-Acked-by: David Hildenbrand <david@redhat.com>
Pablo Greco e6a3ae
RH-Acked-by: Jens Freimann <jfreimann@redhat.com>
Pablo Greco e6a3ae
Pablo Greco e6a3ae
From: "Jason J. Herne" <jjherne@linux.ibm.com>
Pablo Greco e6a3ae
Pablo Greco e6a3ae
Move channel i/o setup code out to a separate function. This decouples cio
Pablo Greco e6a3ae
setup from the virtio code path and allows us to make use of it for booting
Pablo Greco e6a3ae
dasd devices.
Pablo Greco e6a3ae
Pablo Greco e6a3ae
Signed-off-by: Jason J. Herne <jjherne@linux.ibm.com>
Pablo Greco e6a3ae
Acked-by: Halil Pasic <pasic@linux.vnet.ibm.com>
Pablo Greco e6a3ae
Reviewed-by: Collin Walling <walling@linux.ibm.com>
Pablo Greco e6a3ae
Reviewed-by: Farhan Ali <alifm@linux.ibm.com>
Pablo Greco e6a3ae
Reviewed-by: Thomas Huth <thuth@redhat.com>
Pablo Greco e6a3ae
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Pablo Greco e6a3ae
Message-Id: <1554388475-18329-3-git-send-email-jjherne@linux.ibm.com>
Pablo Greco e6a3ae
Signed-off-by: Thomas Huth <thuth@redhat.com>
Pablo Greco e6a3ae
(cherry picked from commit 87f910c142d5589ef937ac216f92c6dcddae955e)
Pablo Greco e6a3ae
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
Pablo Greco e6a3ae
---
Pablo Greco e6a3ae
 pc-bios/s390-ccw/main.c | 20 +++++++++++++-------
Pablo Greco e6a3ae
 1 file changed, 13 insertions(+), 7 deletions(-)
Pablo Greco e6a3ae
Pablo Greco e6a3ae
diff --git a/pc-bios/s390-ccw/main.c b/pc-bios/s390-ccw/main.c
Pablo Greco e6a3ae
index 544851d..e82fe2c 100644
Pablo Greco e6a3ae
--- a/pc-bios/s390-ccw/main.c
Pablo Greco e6a3ae
+++ b/pc-bios/s390-ccw/main.c
Pablo Greco e6a3ae
@@ -99,6 +99,18 @@ static void menu_setup(void)
Pablo Greco e6a3ae
     }
Pablo Greco e6a3ae
 }
Pablo Greco e6a3ae
 
Pablo Greco e6a3ae
+/*
Pablo Greco e6a3ae
+ * Initialize the channel I/O subsystem so we can talk to our ipl/boot device.
Pablo Greco e6a3ae
+ */
Pablo Greco e6a3ae
+static void css_setup(void)
Pablo Greco e6a3ae
+{
Pablo Greco e6a3ae
+    /*
Pablo Greco e6a3ae
+     * Unconditionally enable mss support. In every sane configuration this
Pablo Greco e6a3ae
+     * will succeed; and even if it doesn't, stsch_err() can handle it.
Pablo Greco e6a3ae
+     */
Pablo Greco e6a3ae
+    enable_mss_facility();
Pablo Greco e6a3ae
+}
Pablo Greco e6a3ae
+
Pablo Greco e6a3ae
 static void virtio_setup(void)
Pablo Greco e6a3ae
 {
Pablo Greco e6a3ae
     Schib schib;
Pablo Greco e6a3ae
@@ -109,13 +121,6 @@ static void virtio_setup(void)
Pablo Greco e6a3ae
     VDev *vdev = virtio_get_device();
Pablo Greco e6a3ae
     QemuIplParameters *early_qipl = (QemuIplParameters *)QIPL_ADDRESS;
Pablo Greco e6a3ae
 
Pablo Greco e6a3ae
-    /*
Pablo Greco e6a3ae
-     * We unconditionally enable mss support. In every sane configuration,
Pablo Greco e6a3ae
-     * this will succeed; and even if it doesn't, stsch_err() can deal
Pablo Greco e6a3ae
-     * with the consequences.
Pablo Greco e6a3ae
-     */
Pablo Greco e6a3ae
-    enable_mss_facility();
Pablo Greco e6a3ae
-
Pablo Greco e6a3ae
     sclp_get_loadparm_ascii(loadparm_str);
Pablo Greco e6a3ae
     memcpy(ldp + 10, loadparm_str, LOADPARM_LEN);
Pablo Greco e6a3ae
     sclp_print(ldp);
Pablo Greco e6a3ae
@@ -168,6 +173,7 @@ static void virtio_setup(void)
Pablo Greco e6a3ae
 int main(void)
Pablo Greco e6a3ae
 {
Pablo Greco e6a3ae
     sclp_setup();
Pablo Greco e6a3ae
+    css_setup();
Pablo Greco e6a3ae
     virtio_setup();
Pablo Greco e6a3ae
 
Pablo Greco e6a3ae
     zipl_load(); /* no return */
Pablo Greco e6a3ae
-- 
Pablo Greco e6a3ae
1.8.3.1
Pablo Greco e6a3ae