[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH-RFC 01/13] virtio: export virtqueue structure
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PATCH-RFC 01/13] virtio: export virtqueue structure |
Date: |
Mon, 11 Jan 2010 19:16:49 +0200 |
User-agent: |
Mutt/1.5.19 (2009-01-05) |
vhost needs physical addresses for
ring so expose that structure.
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
hw/virtio.c | 18 ------------------
hw/virtio.h | 17 +++++++++++++++++
2 files changed, 17 insertions(+), 18 deletions(-)
diff --git a/hw/virtio.c b/hw/virtio.c
index 3c609ce..8e3c9ad 100644
--- a/hw/virtio.c
+++ b/hw/virtio.c
@@ -49,24 +49,6 @@ typedef struct VRingUsed
VRingUsedElem ring[0];
} VRingUsed;
-typedef struct VRing
-{
- unsigned int num;
- target_phys_addr_t desc;
- target_phys_addr_t avail;
- target_phys_addr_t used;
-} VRing;
-
-struct VirtQueue
-{
- VRing vring;
- target_phys_addr_t pa;
- uint16_t last_avail_idx;
- int inuse;
- uint16_t vector;
- void (*handle_output)(VirtIODevice *vdev, VirtQueue *vq);
-};
-
#define VIRTIO_PCI_QUEUE_MAX 16
/* virt queue functions */
diff --git a/hw/virtio.h b/hw/virtio.h
index 3994cc9..ca840e1 100644
--- a/hw/virtio.h
+++ b/hw/virtio.h
@@ -180,5 +180,22 @@ void virtio_net_exit(VirtIODevice *vdev);
DEFINE_PROP_BIT("indirect_desc", _state, _field, \
VIRTIO_RING_F_INDIRECT_DESC, true)
+typedef struct VRing
+{
+ unsigned int num;
+ target_phys_addr_t desc;
+ target_phys_addr_t avail;
+ target_phys_addr_t used;
+} VRing;
+
+struct VirtQueue
+{
+ VRing vring;
+ target_phys_addr_t pa;
+ uint16_t last_avail_idx;
+ int inuse;
+ uint16_t vector;
+ void (*handle_output)(VirtIODevice *vdev, VirtQueue *vq);
+};
#endif
--
1.6.6.rc1.43.gf55cc
- [Qemu-devel] [PATCH-RFC 01/13] virtio: export virtqueue structure,
Michael S. Tsirkin <=