Blame SOURCES/kvm-s390-bios-Add-channel-command-codes-structs-needed-f.patch

016a62
From 81d722eaf6284d55e2da0ba6cc4874bfd262a7e2 Mon Sep 17 00:00:00 2001
016a62
From: Thomas Huth <thuth@redhat.com>
016a62
Date: Mon, 14 Oct 2019 10:06:43 +0100
016a62
Subject: [PATCH 18/21] s390-bios: Add channel command codes/structs needed for
016a62
 dasd-ipl
016a62
016a62
RH-Author: Thomas Huth <thuth@redhat.com>
016a62
Message-id: <20191014100645.22862-16-thuth@redhat.com>
016a62
Patchwork-id: 91792
016a62
O-Subject: [RHEL-8.2.0 qemu-kvm PATCH v2 15/17] s390-bios: Add channel command codes/structs needed for dasd-ipl
016a62
Bugzilla: 1664376
016a62
RH-Acked-by: Cornelia Huck <cohuck@redhat.com>
016a62
RH-Acked-by: David Hildenbrand <david@redhat.com>
016a62
RH-Acked-by: Jens Freimann <jfreimann@redhat.com>
016a62
016a62
From: "Jason J. Herne" <jjherne@linux.ibm.com>
016a62
016a62
The dasd IPL procedure needs to execute a few previously unused
016a62
channel commands. Let's define them and their associated data
016a62
structures.
016a62
016a62
Signed-off-by: Jason J. Herne <jjherne@linux.ibm.com>
016a62
Acked-by: Cornelia Huck <cohuck@redhat.com>
016a62
Acked-by: Thomas Huth <thuth@redhat.com>
016a62
Message-Id: <1554388475-18329-15-git-send-email-jjherne@linux.ibm.com>
016a62
Signed-off-by: Thomas Huth <thuth@redhat.com>
016a62
(cherry picked from commit 69333c36dc85b84b021766747cffc2b53df93ae8)
016a62
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
016a62
---
016a62
 pc-bios/s390-ccw/cio.h | 23 +++++++++++++++++++++++
016a62
 1 file changed, 23 insertions(+)
016a62
016a62
diff --git a/pc-bios/s390-ccw/cio.h b/pc-bios/s390-ccw/cio.h
016a62
index 1637e32..aaa432d 100644
016a62
--- a/pc-bios/s390-ccw/cio.h
016a62
+++ b/pc-bios/s390-ccw/cio.h
016a62
@@ -200,11 +200,14 @@ typedef struct ccw1 {
016a62
 #define CCW_FLAG_IDA             0x04
016a62
 #define CCW_FLAG_SUSPEND         0x02
016a62
 
016a62
+/* Common CCW commands */
016a62
+#define CCW_CMD_READ_IPL         0x02
016a62
 #define CCW_CMD_NOOP             0x03
016a62
 #define CCW_CMD_BASIC_SENSE      0x04
016a62
 #define CCW_CMD_TIC              0x08
016a62
 #define CCW_CMD_SENSE_ID         0xe4
016a62
 
016a62
+/* Virtio CCW commands */
016a62
 #define CCW_CMD_SET_VQ           0x13
016a62
 #define CCW_CMD_VDEV_RESET       0x33
016a62
 #define CCW_CMD_READ_FEAT        0x12
016a62
@@ -216,6 +219,12 @@ typedef struct ccw1 {
016a62
 #define CCW_CMD_SET_CONF_IND     0x53
016a62
 #define CCW_CMD_READ_VQ_CONF     0x32
016a62
 
016a62
+/* DASD CCW commands */
016a62
+#define CCW_CMD_DASD_READ             0x06
016a62
+#define CCW_CMD_DASD_SEEK             0x07
016a62
+#define CCW_CMD_DASD_SEARCH_ID_EQ     0x31
016a62
+#define CCW_CMD_DASD_READ_MT          0x86
016a62
+
016a62
 /*
016a62
  * Command-mode operation request block
016a62
  */
016a62
@@ -333,6 +342,20 @@ typedef struct irb {
016a62
     __u32 emw[8];
016a62
 }  __attribute__ ((packed, aligned(4))) Irb;
016a62
 
016a62
+/* Used for SEEK ccw commands */
016a62
+typedef struct CcwSeekData {
016a62
+    uint16_t reserved;
016a62
+    uint16_t cyl;
016a62
+    uint16_t head;
016a62
+} __attribute__((packed)) CcwSeekData;
016a62
+
016a62
+/* Used for SEARCH ID ccw commands */
016a62
+typedef struct CcwSearchIdData {
016a62
+    uint16_t cyl;
016a62
+    uint16_t head;
016a62
+    uint8_t record;
016a62
+} __attribute__((packed)) CcwSearchIdData;
016a62
+
016a62
 int enable_mss_facility(void);
016a62
 void enable_subchannel(SubChannelId schid);
016a62
 uint16_t cu_type(SubChannelId schid);
016a62
-- 
016a62
1.8.3.1
016a62