Displaying 10 results from an estimated 10 matches for "vringusedelem".
Did you mean:
vring_used_elem
2007 Dec 21
0
[Virtio-for-kvm] [PATCH 1/7] userspace virtio
...sure compiler knows to grab that: we don't want it changing! */
+ wmb();
+
+ if (next >= vq->vring.num)
+ errx(1, "Desc next is %u", next);
+
+ return next;
+}
+
+void virtqueue_push(VirtQueue *vq, const VirtQueueElement *elem,
+ unsigned int len)
+{
+ VRingUsedElem *used;
+
+ /* Get a pointer to the next entry in the used ring. */
+ used = &vq->vring.used->ring[vq->vring.used->idx % vq->vring.num];
+ used->id = elem->index;
+ used->len = len;
+ /* Make sure buffer is written before we update index. */
+ wmb();
+...
2007 Dec 21
0
[Virtio-for-kvm] [PATCH 1/7] userspace virtio
...sure compiler knows to grab that: we don't want it changing! */
+ wmb();
+
+ if (next >= vq->vring.num)
+ errx(1, "Desc next is %u", next);
+
+ return next;
+}
+
+void virtqueue_push(VirtQueue *vq, const VirtQueueElement *elem,
+ unsigned int len)
+{
+ VRingUsedElem *used;
+
+ /* Get a pointer to the next entry in the used ring. */
+ used = &vq->vring.used->ring[vq->vring.used->idx % vq->vring.num];
+ used->id = elem->index;
+ used->len = len;
+ /* Make sure buffer is written before we update index. */
+ wmb();
+...
2009 Aug 13
0
[PATCHv2 3/3] qemu-kvm: vhost-net implementation
...+ .irqfd = virtio_pci_irqfd,
+ .queuefd = virtio_pci_queuefd,
};
static void virtio_init_pci(VirtIOPCIProxy *proxy, VirtIODevice *vdev,
diff --git a/hw/virtio.c b/hw/virtio.c
index 41e7ca2..bf53386 100644
--- a/hw/virtio.c
+++ b/hw/virtio.c
@@ -54,24 +54,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;
- uint1...
2009 Aug 13
0
[PATCHv2 3/3] qemu-kvm: vhost-net implementation
...+ .irqfd = virtio_pci_irqfd,
+ .queuefd = virtio_pci_queuefd,
};
static void virtio_init_pci(VirtIOPCIProxy *proxy, VirtIODevice *vdev,
diff --git a/hw/virtio.c b/hw/virtio.c
index 41e7ca2..bf53386 100644
--- a/hw/virtio.c
+++ b/hw/virtio.c
@@ -54,24 +54,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;
- uint1...
2009 Aug 17
1
[PATCHv3 3/4] qemu-kvm: vhost-net implementation
...+ .irqfd = virtio_pci_irqfd,
+ .queuefd = virtio_pci_queuefd,
};
static void virtio_init_pci(VirtIOPCIProxy *proxy, VirtIODevice *vdev,
diff --git a/hw/virtio.c b/hw/virtio.c
index 41e7ca2..bf53386 100644
--- a/hw/virtio.c
+++ b/hw/virtio.c
@@ -54,24 +54,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;
- uint1...
2009 Aug 17
1
[PATCHv3 3/4] qemu-kvm: vhost-net implementation
...+ .irqfd = virtio_pci_irqfd,
+ .queuefd = virtio_pci_queuefd,
};
static void virtio_init_pci(VirtIOPCIProxy *proxy, VirtIODevice *vdev,
diff --git a/hw/virtio.c b/hw/virtio.c
index 41e7ca2..bf53386 100644
--- a/hw/virtio.c
+++ b/hw/virtio.c
@@ -54,24 +54,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;
- uint1...
2009 Aug 10
0
[PATCH 3/3] qemu-kvm: vhost-net implementation
...+ .irqfd = virtio_pci_irqfd,
+ .queuefd = virtio_pci_queuefd,
};
static void virtio_init_pci(VirtIOPCIProxy *proxy, VirtIODevice *vdev,
diff --git a/hw/virtio.c b/hw/virtio.c
index 41e7ca2..bf53386 100644
--- a/hw/virtio.c
+++ b/hw/virtio.c
@@ -54,24 +54,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;
- uint1...
2009 Aug 10
0
[PATCH 3/3] qemu-kvm: vhost-net implementation
...+ .irqfd = virtio_pci_irqfd,
+ .queuefd = virtio_pci_queuefd,
};
static void virtio_init_pci(VirtIOPCIProxy *proxy, VirtIODevice *vdev,
diff --git a/hw/virtio.c b/hw/virtio.c
index 41e7ca2..bf53386 100644
--- a/hw/virtio.c
+++ b/hw/virtio.c
@@ -54,24 +54,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;
- uint1...
2009 Nov 02
2
[PATCHv4 6/6] qemu-kvm: vhost-net implementation
...+ .irqfd = virtio_pci_irqfd,
+ .queuefd = virtio_pci_queuefd,
};
static void virtio_init_pci(VirtIOPCIProxy *proxy, VirtIODevice *vdev,
diff --git a/hw/virtio.c b/hw/virtio.c
index 337ff27..cc5c205 100644
--- a/hw/virtio.c
+++ b/hw/virtio.c
@@ -54,24 +54,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;
- uint1...
2009 Nov 02
2
[PATCHv4 6/6] qemu-kvm: vhost-net implementation
...+ .irqfd = virtio_pci_irqfd,
+ .queuefd = virtio_pci_queuefd,
};
static void virtio_init_pci(VirtIOPCIProxy *proxy, VirtIODevice *vdev,
diff --git a/hw/virtio.c b/hw/virtio.c
index 337ff27..cc5c205 100644
--- a/hw/virtio.c
+++ b/hw/virtio.c
@@ -54,24 +54,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;
- uint1...