------- Comment From <email address hidden> 2020-09-10 11:46 EDT-------
(In reply to comment #19)
...snip...
> If you want to drive this forward to FOCAL as well it might be useful to
> provide us a header update with just exactly what you need instead.
As far as the header update in QEMU goes, these two kernel commits are the ones involved:
d8cac29b1d52 vfio-ccw: Introduce a new CRW region
24c986748ba6 vfio-ccw: Introduce a new schib region
+/*
+ * Used for processing commands that read the subchannel-information block
+ * Reading this region triggers a stsch() to hardware
+ * Note: this is controlled by a capability
+ */
+struct ccw_schib_region {
+#define SCHIB_AREA_SIZE 52
+ __u8 schib_area[SCHIB_AREA_SIZE];
+} __attribute__((packed));
+
+/*
+ * Used for returning a Channel Report Word to userspace.
+ * Note: this is controlled by a capability
+ */
+struct ccw_crw_region {
+ __u32 crw;
+ __u32 pad;
+} __attribute__((packed));
+
#endif
------- Comment From <email address hidden> 2020-09-10 11:46 EDT-------
(In reply to comment #19)
...snip...
> If you want to drive this forward to FOCAL as well it might be useful to
> provide us a header update with just exactly what you need instead.
As far as the header update in QEMU goes, these two kernel commits are the ones involved:
d8cac29b1d52 vfio-ccw: Introduce a new CRW region
24c986748ba6 vfio-ccw: Introduce a new schib region
With those applied to kernel 5.4, the following diff is the important hunk for QEMU. Should apply to https:/ /git.launchpad. net/~usd- import- team/ubuntu/ +source/ qemu branch origin/ ubuntu/ focal-devel
diff --git a/linux- headers/ linux/vfio. h b/linux- headers/ linux/vfio. h .9e227348b 100644 headers/ linux/vfio. h headers/ linux/vfio. h gfx_edid { TYPE_CCW */ SUBTYPE_ CCW_ASYNC_ CMD (1) SUBTYPE_ CCW_SCHIB (2) SUBTYPE_ CCW_CRW (3)
index fb10370d2.
--- a/linux-
+++ b/linux-
@@ -378,6 +378,8 @@ struct vfio_region_
/* sub-types for VFIO_REGION_
#define VFIO_REGION_
+#define VFIO_REGION_
+#define VFIO_REGION_
/*
* The MSIX mappable capability informs that MSIX data of a BAR can be mmapped
@@ -577,6 +579,7 @@ enum {
enum { IO_IRQ_ INDEX, CRW_IRQ_ INDEX,
VFIO_CCW_
+ VFIO_CCW_
VFIO_CCW_NUM_IRQS
};
diff --git a/linux- headers/ linux/vfio_ ccw.h b/linux- headers/ linux/vfio_ ccw.h .516496f1d 100644 headers/ linux/vfio_ ccw.h headers/ linux/vfio_ ccw.h _((packed) );
index fcc3e69ef.
--- a/linux-
+++ b/linux-
@@ -34,4 +34,23 @@ struct ccw_cmd_region {
__u32 ret_code;
} __attribute_
+/* information block SCHIB_AREA_ SIZE]; _((packed) ); _((packed) );
+ * Used for processing commands that read the subchannel-
+ * Reading this region triggers a stsch() to hardware
+ * Note: this is controlled by a capability
+ */
+struct ccw_schib_region {
+#define SCHIB_AREA_SIZE 52
+ __u8 schib_area[
+} __attribute_
+
+/*
+ * Used for returning a Channel Report Word to userspace.
+ * Note: this is controlled by a capability
+ */
+struct ccw_crw_region {
+ __u32 crw;
+ __u32 pad;
+} __attribute_
+
#endif