From 1053587c3fb50fb78e18a2e32b90e272c1796de0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Mar=C3=AD?= Date: Mon, 1 Sep 2014 12:08:00 +0200 Subject: libqos: Added EVENT_IDX support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added avail_event and NO_NOTIFY check before notifying. Added used_event setting. Signed-off-by: Marc MarĂ­ Signed-off-by: Stefan Hajnoczi --- tests/libqos/virtio.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/libqos/virtio.h') diff --git a/tests/libqos/virtio.h b/tests/libqos/virtio.h index cebccd2..70b3376 100644 --- a/tests/libqos/virtio.h +++ b/tests/libqos/virtio.h @@ -26,6 +26,7 @@ #define QVIRTIO_F_ANY_LAYOUT 0x08000000 #define QVIRTIO_F_RING_INDIRECT_DESC 0x10000000 #define QVIRTIO_F_RING_EVENT_IDX 0x20000000 +#define QVIRTIO_F_BAD_FEATURE 0x40000000 #define QVRING_DESC_F_NEXT 0x1 #define QVRING_DESC_F_WRITE 0x2 @@ -57,6 +58,7 @@ typedef struct QVRingAvail { uint16_t flags; uint16_t idx; uint16_t ring[0]; /* This is an array of uint16_t */ + uint16_t used_event; } QVRingAvail; typedef struct QVRingUsedElem { @@ -68,6 +70,7 @@ typedef struct QVRingUsed { uint16_t flags; uint16_t idx; QVRingUsedElem ring[0]; /* This is an array of QVRingUsedElem structs */ + uint16_t avail_event; } QVRingUsed; typedef struct QVirtQueue { @@ -80,6 +83,7 @@ typedef struct QVirtQueue { uint32_t num_free; uint32_t align; bool indirect; + bool event; } QVirtQueue; typedef struct QVRingIndirectDesc { @@ -174,4 +178,5 @@ uint32_t qvirtqueue_add_indirect(QVirtQueue *vq, QVRingIndirectDesc *indirect); void qvirtqueue_kick(const QVirtioBus *bus, QVirtioDevice *d, QVirtQueue *vq, uint32_t free_head); +void qvirtqueue_set_used_event(QVirtQueue *vq, uint16_t idx); #endif -- cgit v1.1