qemu/include/hw/s390x/s390-ccw.h
<<
>>
Prefs
   1/*
   2 * s390 CCW Assignment Support
   3 *
   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>
   7 *
   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.
  11 */
  12
  13#ifndef HW_S390_CCW_H
  14#define HW_S390_CCW_H
  15
  16#include "hw/s390x/ccw-device.h"
  17
  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)
  25
  26typedef struct S390CCWDevice {
  27    CcwDevice parent_obj;
  28    CssDevId hostid;
  29    char *mdevid;
  30    int32_t bootindex;
  31} S390CCWDevice;
  32
  33typedef struct S390CCWDeviceClass {
  34    CCWDeviceClass parent_class;
  35    void (*realize)(S390CCWDevice *dev, char *sysfsdev, Error **errp);
  36    void (*unrealize)(S390CCWDevice *dev, Error **errp);
  37    IOInstEnding (*handle_request) (SubchDev *sch);
  38    int (*handle_halt) (SubchDev *sch);
  39    int (*handle_clear) (SubchDev *sch);
  40} S390CCWDeviceClass;
  41
  42#endif
  43