yeahuh / rpms / qemu-kvm

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