summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKONRAD Frederic <fred.konrad@greensocs.com>2013-04-11 16:29:56 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2013-04-17 10:28:21 -0500
commit6a87acf7df4b31ca0896b95b86dac9698420a9ed (patch)
treebe1aba32a36f9a2e96a1dcf3d2b38421a15eb9d5 /include
parente6f53fd514bbdcf63a5905536ff4d0effc146742 (diff)
downloadqemu-6a87acf7df4b31ca0896b95b86dac9698420a9ed.tar.gz
virtio: add two functions to VirtioDeviceClass.
Recent changes need two functions to VirtioDevice. This just add them into VirtioDeviceClass. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com> Message-id: 1365690602-22729-2-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'include')
-rw-r--r--include/hw/virtio/virtio.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h
index 7e24b2b69a..b21e5c2b9d 100644
--- a/include/hw/virtio/virtio.h
+++ b/include/hw/virtio/virtio.h
@@ -171,6 +171,18 @@ typedef struct VirtioDeviceClass {
void (*set_config)(VirtIODevice *vdev, const uint8_t *config);
void (*reset)(VirtIODevice *vdev);
void (*set_status)(VirtIODevice *vdev, uint8_t val);
+ /* Test and clear event pending status.
+ * Should be called after unmask to avoid losing events.
+ * If backend does not support masking,
+ * must check in frontend instead.
+ */
+ bool (*guest_notifier_pending)(VirtIODevice *vdev, int n);
+ /* Mask/unmask events from this vq. Any events reported
+ * while masked will become pending.
+ * If backend does not support masking,
+ * must mask in frontend instead.
+ */
+ void (*guest_notifier_mask)(VirtIODevice *vdev, int n, bool mask);
} VirtioDeviceClass;
void virtio_init(VirtIODevice *vdev, const char *name,