summaryrefslogtreecommitdiff
path: root/hw/s390x/virtio-ccw.h
diff options
context:
space:
mode:
authorCornelia Huck <cornelia.huck@de.ibm.com>2013-02-15 10:18:43 +0100
committerCornelia Huck <cornelia.huck@de.ibm.com>2013-06-25 17:11:11 +0200
commitb4436a0b4db0334c3157f71e9baa2944a133c4d4 (patch)
tree2cec150cd86566799faf013f67e432656097eef4 /hw/s390x/virtio-ccw.h
parent6504a93011138458a2e4f67b513c5a77bdb3cae1 (diff)
downloadqemu-b4436a0b4db0334c3157f71e9baa2944a133c4d4.tar.gz
virtio-ccw: Wire up ioeventfd.
On hosts that support ioeventfd, make use of it for host-to-guest notifications via diagnose 500. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'hw/s390x/virtio-ccw.h')
-rw-r--r--hw/s390x/virtio-ccw.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/hw/s390x/virtio-ccw.h b/hw/s390x/virtio-ccw.h
index 121a5f8c4a..433f27af4b 100644
--- a/hw/s390x/virtio-ccw.h
+++ b/hw/s390x/virtio-ccw.h
@@ -69,6 +69,11 @@ typedef struct VirtIOCCWDeviceClass {
/* Change here if we want to support more feature bits. */
#define VIRTIO_CCW_FEATURE_SIZE 1
+/* Performance improves when virtqueue kick processing is decoupled from the
+ * vcpu thread using ioeventfd for some devices. */
+#define VIRTIO_CCW_FLAG_USE_IOEVENTFD_BIT 1
+#define VIRTIO_CCW_FLAG_USE_IOEVENTFD (1 << VIRTIO_CCW_FLAG_USE_IOEVENTFD_BIT)
+
struct VirtioCcwDevice {
DeviceState parent_obj;
SubchDev *sch;
@@ -76,6 +81,8 @@ struct VirtioCcwDevice {
char *bus_id;
uint32_t host_features[VIRTIO_CCW_FEATURE_SIZE];
VirtioBusState bus;
+ bool ioeventfd_started;
+ uint32_t flags;
/* Guest provided values: */
hwaddr indicators;
hwaddr indicators2;