|
|
ddf19c |
From 1da0eecb9f2086c880fdaf1260ae775bbfbf5f02 Mon Sep 17 00:00:00 2001
|
|
|
ddf19c |
From: Cornelia Huck <cohuck@redhat.com>
|
|
|
ddf19c |
Date: Tue, 23 Jun 2020 09:25:37 -0400
|
|
|
ddf19c |
Subject: [PATCH 03/12] linux-headers: support vfio-ccw features
|
|
|
ddf19c |
|
|
|
ddf19c |
RH-Author: Cornelia Huck <cohuck@redhat.com>
|
|
|
ddf19c |
Message-id: <20200623092543.358315-4-cohuck@redhat.com>
|
|
|
ddf19c |
Patchwork-id: 97696
|
|
|
ddf19c |
O-Subject: [RHEL-8.3.0 qemu-kvm PATCH 3/9] linux-headers: support vfio-ccw features
|
|
|
ddf19c |
Bugzilla: 1660916
|
|
|
ddf19c |
RH-Acked-by: Claudio Imbrenda <cimbrend@redhat.com>
|
|
|
ddf19c |
RH-Acked-by: David Hildenbrand <david@redhat.com>
|
|
|
ddf19c |
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
|
|
ddf19c |
|
|
|
ddf19c |
Partial update to support CRW and SCHIB regions.
|
|
|
ddf19c |
|
|
|
ddf19c |
Upstream: n/a
|
|
|
ddf19c |
|
|
|
ddf19c |
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
|
|
|
ddf19c |
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
|
|
ddf19c |
---
|
|
|
ddf19c |
linux-headers/linux/vfio.h | 3 +++
|
|
|
ddf19c |
linux-headers/linux/vfio_ccw.h | 19 +++++++++++++++++++
|
|
|
ddf19c |
2 files changed, 22 insertions(+)
|
|
|
ddf19c |
|
|
|
ddf19c |
diff --git a/linux-headers/linux/vfio.h b/linux-headers/linux/vfio.h
|
|
|
ddf19c |
index fb10370d29..9e227348b3 100644
|
|
|
ddf19c |
--- a/linux-headers/linux/vfio.h
|
|
|
ddf19c |
+++ b/linux-headers/linux/vfio.h
|
|
|
ddf19c |
@@ -378,6 +378,8 @@ struct vfio_region_gfx_edid {
|
|
|
ddf19c |
|
|
|
ddf19c |
/* sub-types for VFIO_REGION_TYPE_CCW */
|
|
|
ddf19c |
#define VFIO_REGION_SUBTYPE_CCW_ASYNC_CMD (1)
|
|
|
ddf19c |
+#define VFIO_REGION_SUBTYPE_CCW_SCHIB (2)
|
|
|
ddf19c |
+#define VFIO_REGION_SUBTYPE_CCW_CRW (3)
|
|
|
ddf19c |
|
|
|
ddf19c |
/*
|
|
|
ddf19c |
* The MSIX mappable capability informs that MSIX data of a BAR can be mmapped
|
|
|
ddf19c |
@@ -577,6 +579,7 @@ enum {
|
|
|
ddf19c |
|
|
|
ddf19c |
enum {
|
|
|
ddf19c |
VFIO_CCW_IO_IRQ_INDEX,
|
|
|
ddf19c |
+ VFIO_CCW_CRW_IRQ_INDEX,
|
|
|
ddf19c |
VFIO_CCW_NUM_IRQS
|
|
|
ddf19c |
};
|
|
|
ddf19c |
|
|
|
ddf19c |
diff --git a/linux-headers/linux/vfio_ccw.h b/linux-headers/linux/vfio_ccw.h
|
|
|
ddf19c |
index fcc3e69ef5..6375d6ff25 100644
|
|
|
ddf19c |
--- a/linux-headers/linux/vfio_ccw.h
|
|
|
ddf19c |
+++ b/linux-headers/linux/vfio_ccw.h
|
|
|
ddf19c |
@@ -34,4 +34,23 @@ struct ccw_cmd_region {
|
|
|
ddf19c |
__u32 ret_code;
|
|
|
ddf19c |
} __attribute__((packed));
|
|
|
ddf19c |
|
|
|
ddf19c |
+/*
|
|
|
ddf19c |
+ * Used for processing commands that read the subchannel-information block
|
|
|
ddf19c |
+ * Reading this region triggers a stsch() to hardware
|
|
|
ddf19c |
+ * Note: this is controlled by a capability
|
|
|
ddf19c |
+ */
|
|
|
ddf19c |
+struct ccw_schib_region {
|
|
|
ddf19c |
+#define SCHIB_AREA_SIZE 52
|
|
|
ddf19c |
+ __u8 schib_area[SCHIB_AREA_SIZE];
|
|
|
ddf19c |
+} __attribute__((packed));
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+/*
|
|
|
ddf19c |
+ * Used for returning a Channel Report Word to userspace.
|
|
|
ddf19c |
+ * Note: this is controlled by a capability
|
|
|
ddf19c |
+ */
|
|
|
ddf19c |
+struct ccw_crw_region {
|
|
|
ddf19c |
+ __u32 crw;
|
|
|
ddf19c |
+ __u32 pad;
|
|
|
ddf19c |
+} __attribute__((packed));
|
|
|
ddf19c |
+
|
|
|
ddf19c |
#endif
|
|
|
ddf19c |
--
|
|
|
ddf19c |
2.27.0
|
|
|
ddf19c |
|