diff options
Diffstat (limited to 'hw/s390-virtio-bus.h')
-rw-r--r-- | hw/s390-virtio-bus.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/hw/s390-virtio-bus.h b/hw/s390-virtio-bus.h index d02a90709d..b5e59b7d4b 100644 --- a/hw/s390-virtio-bus.h +++ b/hw/s390-virtio-bus.h @@ -40,7 +40,22 @@ #define VIRTIO_PARAM_CONFIG_CHANGED 0x1 #define VIRTIO_PARAM_DEV_ADD 0x2 -typedef struct VirtIOS390Device { +#define TYPE_VIRTIO_S390_DEVICE "virtio-s390-device" +#define VIRTIO_S390_DEVICE(obj) \ + OBJECT_CHECK(VirtIOS390Device, (obj), TYPE_VIRTIO_S390_DEVICE) +#define VIRTIO_S390_DEVICE_CLASS(klass) \ + OBJECT_CLASS_CHECK(VirtIOS390DeviceClass, (klass), TYPE_VIRTIO_S390_DEVICE) +#define VIRTIO_S390_DEVICE_GET_CLASS(obj) \ + OBJECT_GET_CLASS(VirtIOS390DeviceClass, (obj), TYPE_VIRTIO_S390_DEVICE) + +typedef struct VirtIOS390Device VirtIOS390Device; + +typedef struct VirtIOS390DeviceClass { + DeviceClass qdev; + int (*init)(VirtIOS390Device *dev); +} VirtIOS390DeviceClass; + +struct VirtIOS390Device { DeviceState qdev; ram_addr_t dev_offs; ram_addr_t feat_offs; @@ -52,7 +67,7 @@ typedef struct VirtIOS390Device { uint32_t host_features; virtio_serial_conf serial; virtio_net_conf net; -} VirtIOS390Device; +}; typedef struct VirtIOS390Bus { BusState bus; |