diff options
author | Pierre Morel <pmorel@linux.vnet.ibm.com> | 2015-09-07 13:33:56 +0200 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2015-10-12 11:16:45 +0100 |
commit | a9718ef0005d6910097788936dc40c0204713729 (patch) | |
tree | 1aba85f682cc0a7c3965b5db1f8fa5289c6053ce /include | |
parent | fc73548e444ae3239f6cef44a5200b5d2c3e85d1 (diff) |
virtio dataplane: adapt dataplane for virtio Version 1
Let dataplane allocate different region for the desc/avail/used
ring regions.
Take VIRTIO_RING_F_EVENT_IDX into account to increase the used/avail
rings accordingly.
[Fix 32-bit builds by changing 16lx format specifier to HWADDR_PRIx.
--Stefan]
Signed-off-by: Pierre Morel <pmorel@linux.vnet.ibm.com>
Tested-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
Message-id: 1441625636-23773-1-git-send-email-pmorel@linux.vnet.ibm.com
(changed __virtio16 into uint16_t,
map descriptor table and available ring read-only)
Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/virtio/dataplane/vring.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/hw/virtio/dataplane/vring.h b/include/hw/virtio/dataplane/vring.h index 8d97db9e2d..a596e4c175 100644 --- a/include/hw/virtio/dataplane/vring.h +++ b/include/hw/virtio/dataplane/vring.h @@ -22,7 +22,9 @@ #include "hw/virtio/virtio.h" typedef struct { - MemoryRegion *mr; /* memory region containing the vring */ + MemoryRegion *mr_desc; /* memory region for the vring desc */ + MemoryRegion *mr_avail; /* memory region for the vring avail */ + MemoryRegion *mr_used; /* memory region for the vring used */ struct vring vr; /* virtqueue vring mapped to host memory */ uint16_t last_avail_idx; /* last processed avail ring index */ uint16_t last_used_idx; /* last processed used ring index */ |