summaryrefslogtreecommitdiff
path: root/include/hw
diff options
context:
space:
mode:
authorJason J. Herne <jjherne@linux.ibm.com>2019-04-04 10:34:20 -0400
committerThomas Huth <thuth@redhat.com>2019-04-12 12:39:52 +0200
commit44445d8668f458dec0ecb8bcecdcbf24e6d4251b (patch)
tree1aa420b280325cea5aab9f9b8d65d77d45de078f /include/hw
parent532cc6da74ec25b5ba6893b5757c977d54582949 (diff)
s390 vfio-ccw: Add bootindex property and IPLB data
Add bootindex property and iplb data for vfio-ccw devices. This allows us to forward boot information into the bios for vfio-ccw devices. Refactor s390_get_ccw_device() to return device type. This prevents us from having to use messy casting logic in several places. Signed-off-by: Jason J. Herne <jjherne@linux.ibm.com> Acked-by: Halil Pasic <pasic@linux.vnet.ibm.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <1554388475-18329-2-git-send-email-jjherne@linux.ibm.com> [thuth: fixed "typedef struct VFIOCCWDevice" build failure with clang] Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'include/hw')
-rw-r--r--include/hw/s390x/s390-ccw.h1
-rw-r--r--include/hw/s390x/vfio-ccw.h28
2 files changed, 29 insertions, 0 deletions
diff --git a/include/hw/s390x/s390-ccw.h b/include/hw/s390x/s390-ccw.h
index 7d15a1a5d4..901d805d79 100644
--- a/include/hw/s390x/s390-ccw.h
+++ b/include/hw/s390x/s390-ccw.h
@@ -27,6 +27,7 @@ typedef struct S390CCWDevice {
CcwDevice parent_obj;
CssDevId hostid;
char *mdevid;
+ int32_t bootindex;
} S390CCWDevice;
typedef struct S390CCWDeviceClass {
diff --git a/include/hw/s390x/vfio-ccw.h b/include/hw/s390x/vfio-ccw.h
new file mode 100644
index 0000000000..ee5250d0d7
--- /dev/null
+++ b/include/hw/s390x/vfio-ccw.h
@@ -0,0 +1,28 @@
+/*
+ * vfio based subchannel assignment support
+ *
+ * Copyright 2017, 2019 IBM Corp.
+ * Author(s): Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
+ * Xiao Feng Ren <renxiaof@linux.vnet.ibm.com>
+ * Pierre Morel <pmorel@linux.vnet.ibm.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or (at
+ * your option) any later version. See the COPYING file in the top-level
+ * directory.
+ */
+
+#ifndef HW_VFIO_CCW_H
+#define HW_VFIO_CCW_H
+
+#include "hw/vfio/vfio-common.h"
+#include "hw/s390x/s390-ccw.h"
+#include "hw/s390x/ccw-device.h"
+
+#define TYPE_VFIO_CCW "vfio-ccw"
+#define VFIO_CCW(obj) \
+ OBJECT_CHECK(VFIOCCWDevice, (obj), TYPE_VFIO_CCW)
+
+#define TYPE_VFIO_CCW "vfio-ccw"
+typedef struct VFIOCCWDevice VFIOCCWDevice;
+
+#endif