aboutsummaryrefslogtreecommitdiff
path: root/hw/s390x/virtio-ccw.h
diff options
context:
space:
mode:
Diffstat (limited to 'hw/s390x/virtio-ccw.h')
-rw-r--r--hw/s390x/virtio-ccw.h73
1 files changed, 44 insertions, 29 deletions
diff --git a/hw/s390x/virtio-ccw.h b/hw/s390x/virtio-ccw.h
index b281896f7d..c046c816c9 100644
--- a/hw/s390x/virtio-ccw.h
+++ b/hw/s390x/virtio-ccw.h
@@ -17,6 +17,7 @@
#include "hw/virtio/virtio-net.h"
#include "hw/virtio/virtio-serial.h"
#include "hw/virtio/virtio-scsi.h"
+#include "qom/object.h"
#ifdef CONFIG_VHOST_SCSI
#include "hw/virtio/vhost-scsi.h"
#endif
@@ -53,6 +54,8 @@
#define CCW_CMD_SET_VIRTIO_REV 0x83
#define TYPE_VIRTIO_CCW_DEVICE "virtio-ccw-device"
+typedef struct VirtIOCCWDeviceClass VirtIOCCWDeviceClass;
+typedef struct VirtioCcwDevice VirtioCcwDevice;
#define VIRTIO_CCW_DEVICE(obj) \
OBJECT_CHECK(VirtioCcwDevice, (obj), TYPE_VIRTIO_CCW_DEVICE)
#define VIRTIO_CCW_DEVICE_CLASS(klass) \
@@ -71,14 +74,13 @@ typedef struct VirtioBusClass VirtioCcwBusClass;
#define VIRTIO_CCW_BUS_CLASS(klass) \
OBJECT_CLASS_CHECK(VirtioCcwBusClass, klass, TYPE_VIRTIO_CCW_BUS)
-typedef struct VirtioCcwDevice VirtioCcwDevice;
-typedef struct VirtIOCCWDeviceClass {
+struct VirtIOCCWDeviceClass {
CCWDeviceClass parent_class;
void (*realize)(VirtioCcwDevice *dev, Error **errp);
void (*unrealize)(VirtioCcwDevice *dev);
void (*parent_reset)(DeviceState *dev);
-} VirtIOCCWDeviceClass;
+};
/* Performance improves when virtqueue kick processing is decoupled from the
* vcpu thread using ioeventfd for some devices. */
@@ -111,92 +113,100 @@ static inline int virtio_ccw_rev_max(VirtioCcwDevice *dev)
/* virtio-scsi-ccw */
#define TYPE_VIRTIO_SCSI_CCW "virtio-scsi-ccw"
+typedef struct VirtIOSCSICcw VirtIOSCSICcw;
#define VIRTIO_SCSI_CCW(obj) \
OBJECT_CHECK(VirtIOSCSICcw, (obj), TYPE_VIRTIO_SCSI_CCW)
-typedef struct VirtIOSCSICcw {
+struct VirtIOSCSICcw {
VirtioCcwDevice parent_obj;
VirtIOSCSI vdev;
-} VirtIOSCSICcw;
+};
#ifdef CONFIG_VHOST_SCSI
/* vhost-scsi-ccw */
#define TYPE_VHOST_SCSI_CCW "vhost-scsi-ccw"
+typedef struct VHostSCSICcw VHostSCSICcw;
#define VHOST_SCSI_CCW(obj) \
OBJECT_CHECK(VHostSCSICcw, (obj), TYPE_VHOST_SCSI_CCW)
-typedef struct VHostSCSICcw {
+struct VHostSCSICcw {
VirtioCcwDevice parent_obj;
VHostSCSI vdev;
-} VHostSCSICcw;
+};
#endif
/* virtio-blk-ccw */
#define TYPE_VIRTIO_BLK_CCW "virtio-blk-ccw"
+typedef struct VirtIOBlkCcw VirtIOBlkCcw;
#define VIRTIO_BLK_CCW(obj) \
OBJECT_CHECK(VirtIOBlkCcw, (obj), TYPE_VIRTIO_BLK_CCW)
-typedef struct VirtIOBlkCcw {
+struct VirtIOBlkCcw {
VirtioCcwDevice parent_obj;
VirtIOBlock vdev;
-} VirtIOBlkCcw;
+};
/* virtio-balloon-ccw */
#define TYPE_VIRTIO_BALLOON_CCW "virtio-balloon-ccw"
+typedef struct VirtIOBalloonCcw VirtIOBalloonCcw;
#define VIRTIO_BALLOON_CCW(obj) \
OBJECT_CHECK(VirtIOBalloonCcw, (obj), TYPE_VIRTIO_BALLOON_CCW)
-typedef struct VirtIOBalloonCcw {
+struct VirtIOBalloonCcw {
VirtioCcwDevice parent_obj;
VirtIOBalloon vdev;
-} VirtIOBalloonCcw;
+};
/* virtio-serial-ccw */
#define TYPE_VIRTIO_SERIAL_CCW "virtio-serial-ccw"
+typedef struct VirtioSerialCcw VirtioSerialCcw;
#define VIRTIO_SERIAL_CCW(obj) \
OBJECT_CHECK(VirtioSerialCcw, (obj), TYPE_VIRTIO_SERIAL_CCW)
-typedef struct VirtioSerialCcw {
+struct VirtioSerialCcw {
VirtioCcwDevice parent_obj;
VirtIOSerial vdev;
-} VirtioSerialCcw;
+};
/* virtio-net-ccw */
#define TYPE_VIRTIO_NET_CCW "virtio-net-ccw"
+typedef struct VirtIONetCcw VirtIONetCcw;
#define VIRTIO_NET_CCW(obj) \
OBJECT_CHECK(VirtIONetCcw, (obj), TYPE_VIRTIO_NET_CCW)
-typedef struct VirtIONetCcw {
+struct VirtIONetCcw {
VirtioCcwDevice parent_obj;
VirtIONet vdev;
-} VirtIONetCcw;
+};
/* virtio-rng-ccw */
#define TYPE_VIRTIO_RNG_CCW "virtio-rng-ccw"
+typedef struct VirtIORNGCcw VirtIORNGCcw;
#define VIRTIO_RNG_CCW(obj) \
OBJECT_CHECK(VirtIORNGCcw, (obj), TYPE_VIRTIO_RNG_CCW)
-typedef struct VirtIORNGCcw {
+struct VirtIORNGCcw {
VirtioCcwDevice parent_obj;
VirtIORNG vdev;
-} VirtIORNGCcw;
+};
/* virtio-crypto-ccw */
#define TYPE_VIRTIO_CRYPTO_CCW "virtio-crypto-ccw"
+typedef struct VirtIOCryptoCcw VirtIOCryptoCcw;
#define VIRTIO_CRYPTO_CCW(obj) \
OBJECT_CHECK(VirtIOCryptoCcw, (obj), TYPE_VIRTIO_CRYPTO_CCW)
-typedef struct VirtIOCryptoCcw {
+struct VirtIOCryptoCcw {
VirtioCcwDevice parent_obj;
VirtIOCrypto vdev;
-} VirtIOCryptoCcw;
+};
VirtIODevice *virtio_ccw_get_vdev(SubchDev *sch);
@@ -204,56 +214,61 @@ VirtIODevice *virtio_ccw_get_vdev(SubchDev *sch);
#include "hw/9pfs/virtio-9p.h"
#define TYPE_VIRTIO_9P_CCW "virtio-9p-ccw"
+typedef struct V9fsCCWState V9fsCCWState;
#define VIRTIO_9P_CCW(obj) \
OBJECT_CHECK(V9fsCCWState, (obj), TYPE_VIRTIO_9P_CCW)
-typedef struct V9fsCCWState {
+struct V9fsCCWState {
VirtioCcwDevice parent_obj;
V9fsVirtioState vdev;
-} V9fsCCWState;
+};
#endif /* CONFIG_VIRTFS */
#ifdef CONFIG_VHOST_VSOCK
#define TYPE_VHOST_VSOCK_CCW "vhost-vsock-ccw"
+typedef struct VHostVSockCCWState VHostVSockCCWState;
#define VHOST_VSOCK_CCW(obj) \
OBJECT_CHECK(VHostVSockCCWState, (obj), TYPE_VHOST_VSOCK_CCW)
-typedef struct VHostVSockCCWState {
+struct VHostVSockCCWState {
VirtioCcwDevice parent_obj;
VHostVSock vdev;
-} VHostVSockCCWState;
+};
#endif /* CONFIG_VHOST_VSOCK */
#define TYPE_VIRTIO_GPU_CCW "virtio-gpu-ccw"
+typedef struct VirtIOGPUCcw VirtIOGPUCcw;
#define VIRTIO_GPU_CCW(obj) \
OBJECT_CHECK(VirtIOGPUCcw, (obj), TYPE_VIRTIO_GPU_CCW)
-typedef struct VirtIOGPUCcw {
+struct VirtIOGPUCcw {
VirtioCcwDevice parent_obj;
VirtIOGPU vdev;
-} VirtIOGPUCcw;
+};
#define TYPE_VIRTIO_INPUT_CCW "virtio-input-ccw"
+typedef struct VirtIOInputCcw VirtIOInputCcw;
#define VIRTIO_INPUT_CCW(obj) \
OBJECT_CHECK(VirtIOInputCcw, (obj), TYPE_VIRTIO_INPUT_CCW)
-typedef struct VirtIOInputCcw {
+struct VirtIOInputCcw {
VirtioCcwDevice parent_obj;
VirtIOInput vdev;
-} VirtIOInputCcw;
+};
#define TYPE_VIRTIO_INPUT_HID_CCW "virtio-input-hid-ccw"
#define TYPE_VIRTIO_KEYBOARD_CCW "virtio-keyboard-ccw"
#define TYPE_VIRTIO_MOUSE_CCW "virtio-mouse-ccw"
#define TYPE_VIRTIO_TABLET_CCW "virtio-tablet-ccw"
+typedef struct VirtIOInputHIDCcw VirtIOInputHIDCcw;
#define VIRTIO_INPUT_HID_CCW(obj) \
OBJECT_CHECK(VirtIOInputHIDCcw, (obj), TYPE_VIRTIO_INPUT_HID_CCW)
-typedef struct VirtIOInputHIDCcw {
+struct VirtIOInputHIDCcw {
VirtioCcwDevice parent_obj;
VirtIOInputHID vdev;
-} VirtIOInputHIDCcw;
+};
#endif