s390x: improve error handling for SSCH and RSCH
[qemu/kevin.git] / include / hw / s390x / s390-ccw.h
blob7d15a1a5d41dc238659cab70ac501b23b6f83cf2
1 /*
2 * s390 CCW Assignment Support
4 * Copyright 2017 IBM Corp.
5 * Author(s): Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
6 * Xiao Feng Ren <renxiaof@linux.vnet.ibm.com>
8 * This work is licensed under the terms of the GNU GPL, version 2 or (at
9 * your option) any later version. See the COPYING file in the top-level
10 * directory.
13 #ifndef HW_S390_CCW_H
14 #define HW_S390_CCW_H
16 #include "hw/s390x/ccw-device.h"
18 #define TYPE_S390_CCW "s390-ccw"
19 #define S390_CCW_DEVICE(obj) \
20 OBJECT_CHECK(S390CCWDevice, (obj), TYPE_S390_CCW)
21 #define S390_CCW_DEVICE_CLASS(klass) \
22 OBJECT_CLASS_CHECK(S390CCWDeviceClass, (klass), TYPE_S390_CCW)
23 #define S390_CCW_DEVICE_GET_CLASS(obj) \
24 OBJECT_GET_CLASS(S390CCWDeviceClass, (obj), TYPE_S390_CCW)
26 typedef struct S390CCWDevice {
27 CcwDevice parent_obj;
28 CssDevId hostid;
29 char *mdevid;
30 } S390CCWDevice;
32 typedef struct S390CCWDeviceClass {
33 CCWDeviceClass parent_class;
34 void (*realize)(S390CCWDevice *dev, char *sysfsdev, Error **errp);
35 void (*unrealize)(S390CCWDevice *dev, Error **errp);
36 IOInstEnding (*handle_request) (SubchDev *sch);
37 } S390CCWDeviceClass;
39 #endif