Displaying 20 results from an estimated 79 matches for "queue_dma_addr".
2014 Aug 27
2
[PATCH 3/3] virtio_pci: Use the DMA API for virtqueues
...irtio/virtio_pci.c
> @@ -80,8 +80,9 @@ struct virtio_pci_vq_info
> /* the number of entries in the queue */
> int num;
>
> - /* the virtual address of the ring queue */
> - void *queue;
> + /* the ring queue */
> + void *queue; /* virtual address */
> + dma_addr_t queue_dma_addr; /* bus address */
>
> /* the list node for the virtqueues list */
> struct list_head node;
> @@ -417,15 +418,16 @@ static struct virtqueue *setup_vq(struct virtio_device *vdev, unsigned index,
> info->num = num;
> info->msix_vector = msix_vec;
>
> - size =...
2014 Aug 27
2
[PATCH 3/3] virtio_pci: Use the DMA API for virtqueues
...irtio/virtio_pci.c
> @@ -80,8 +80,9 @@ struct virtio_pci_vq_info
> /* the number of entries in the queue */
> int num;
>
> - /* the virtual address of the ring queue */
> - void *queue;
> + /* the ring queue */
> + void *queue; /* virtual address */
> + dma_addr_t queue_dma_addr; /* bus address */
>
> /* the list node for the virtqueues list */
> struct list_head node;
> @@ -417,15 +418,16 @@ static struct virtqueue *setup_vq(struct virtio_device *vdev, unsigned index,
> info->num = num;
> info->msix_vector = msix_vec;
>
> - size =...
2014 Sep 17
4
[PATCH v5 2/3] virtio_pci: Use the DMA API for virtqueues when possible
...rtio/virtio_pci.c
> @@ -80,8 +80,10 @@ struct virtio_pci_vq_info
> /* the number of entries in the queue */
> int num;
>
> - /* the virtual address of the ring queue */
> - void *queue;
> + /* the ring queue */
> + void *queue; /* virtual address */
> + dma_addr_t queue_dma_addr; /* bus address */
> + bool use_dma_api; /* are we using the DMA API? */
>
> /* the list node for the virtqueues list */
> struct list_head node;
> @@ -388,6 +390,50 @@ static int vp_request_intx(struct virtio_device *vdev)
> return err;
> }
>
> +static bool v...
2014 Sep 17
4
[PATCH v5 2/3] virtio_pci: Use the DMA API for virtqueues when possible
...rtio/virtio_pci.c
> @@ -80,8 +80,10 @@ struct virtio_pci_vq_info
> /* the number of entries in the queue */
> int num;
>
> - /* the virtual address of the ring queue */
> - void *queue;
> + /* the ring queue */
> + void *queue; /* virtual address */
> + dma_addr_t queue_dma_addr; /* bus address */
> + bool use_dma_api; /* are we using the DMA API? */
>
> /* the list node for the virtqueues list */
> struct list_head node;
> @@ -388,6 +390,50 @@ static int vp_request_intx(struct virtio_device *vdev)
> return err;
> }
>
> +static bool v...
2014 Sep 17
1
[PATCH v5 2/3] virtio_pci: Use the DMA API for virtqueues when possible
...rtio/virtio_pci.c
> @@ -80,8 +80,10 @@ struct virtio_pci_vq_info
> /* the number of entries in the queue */
> int num;
>
> - /* the virtual address of the ring queue */
> - void *queue;
> + /* the ring queue */
> + void *queue; /* virtual address */
> + dma_addr_t queue_dma_addr; /* bus address */
> + bool use_dma_api; /* are we using the DMA API? */
>
> /* the list node for the virtqueues list */
> struct list_head node;
> @@ -388,6 +390,50 @@ static int vp_request_intx(struct virtio_device *vdev)
> return err;
> }
>
> +static bool v...
2014 Sep 17
1
[PATCH v5 2/3] virtio_pci: Use the DMA API for virtqueues when possible
...rtio/virtio_pci.c
> @@ -80,8 +80,10 @@ struct virtio_pci_vq_info
> /* the number of entries in the queue */
> int num;
>
> - /* the virtual address of the ring queue */
> - void *queue;
> + /* the ring queue */
> + void *queue; /* virtual address */
> + dma_addr_t queue_dma_addr; /* bus address */
> + bool use_dma_api; /* are we using the DMA API? */
>
> /* the list node for the virtqueues list */
> struct list_head node;
> @@ -388,6 +390,50 @@ static int vp_request_intx(struct virtio_device *vdev)
> return err;
> }
>
> +static bool v...
2018 Sep 12
1
[PATCH net-next v2 2/5] virtio_ring: support creating packed ring
...virtqueue);
> > >
> > > @@ -1142,7 +1408,9 @@ void vring_del_virtqueue(struct virtqueue *_vq)
> > >
> > > if (vq->we_own_ring) {
> > > vring_free_queue(vq->vq.vdev, vq->queue_size_in_bytes,
> > > - vq->vring.desc, vq->queue_dma_addr);
> > > + vq->packed ? (void *)vq->vring_packed.desc :
> > > + (void *)vq->vring.desc,
> > > + vq->queue_dma_addr);
> > > }
> > > list_del(&_vq->list);
> > > kfree(vq);
> > > @@ -1184,7 +1452,7...
2014 Aug 26
0
[PATCH 3/3] virtio_pci: Use the DMA API for virtqueues
...a/drivers/virtio/virtio_pci.c
+++ b/drivers/virtio/virtio_pci.c
@@ -80,8 +80,9 @@ struct virtio_pci_vq_info
/* the number of entries in the queue */
int num;
- /* the virtual address of the ring queue */
- void *queue;
+ /* the ring queue */
+ void *queue; /* virtual address */
+ dma_addr_t queue_dma_addr; /* bus address */
/* the list node for the virtqueues list */
struct list_head node;
@@ -417,15 +418,16 @@ static struct virtqueue *setup_vq(struct virtio_device *vdev, unsigned index,
info->num = num;
info->msix_vector = msix_vec;
- size = PAGE_ALIGN(vring_size(num, VIRTIO_PCI_V...
2014 Aug 27
0
[PATCH 3/3] virtio_pci: Use the DMA API for virtqueues
...; /* the number of entries in the queue */
>> int num;
>>
>> - /* the virtual address of the ring queue */
>> - void *queue;
>> + /* the ring queue */
>> + void *queue; /* virtual address */
>> + dma_addr_t queue_dma_addr; /* bus address */
>>
>> /* the list node for the virtqueues list */
>> struct list_head node;
>> @@ -417,15 +418,16 @@ static struct virtqueue *setup_vq(struct virtio_device *vdev, unsigned index,
>> info->num = num;
>> info->m...
2014 Sep 17
0
[PATCH v5 2/3] virtio_pci: Use the DMA API for virtqueues when possible
.../drivers/virtio/virtio_pci.c
+++ b/drivers/virtio/virtio_pci.c
@@ -80,8 +80,10 @@ struct virtio_pci_vq_info
/* the number of entries in the queue */
int num;
- /* the virtual address of the ring queue */
- void *queue;
+ /* the ring queue */
+ void *queue; /* virtual address */
+ dma_addr_t queue_dma_addr; /* bus address */
+ bool use_dma_api; /* are we using the DMA API? */
/* the list node for the virtqueues list */
struct list_head node;
@@ -388,6 +390,50 @@ static int vp_request_intx(struct virtio_device *vdev)
return err;
}
+static bool vp_use_dma_api(void)
+{
+ /*
+ * Due to limit...
2014 Sep 17
0
[PATCH v5 2/3] virtio_pci: Use the DMA API for virtqueues when possible
...; /* the number of entries in the queue */
>> int num;
>>
>> - /* the virtual address of the ring queue */
>> - void *queue;
>> + /* the ring queue */
>> + void *queue; /* virtual address */
>> + dma_addr_t queue_dma_addr; /* bus address */
>> + bool use_dma_api; /* are we using the DMA API? */
>>
>> /* the list node for the virtqueues list */
>> struct list_head node;
>> @@ -388,6 +390,50 @@ static int vp_request_intx(struct virtio_device *vdev)
>&...
2014 Sep 17
0
[PATCH v5 2/3] virtio_pci: Use the DMA API for virtqueues when possible
...@ struct virtio_pci_vq_info
> > /* the number of entries in the queue */
> > int num;
> >
> > - /* the virtual address of the ring queue */
> > - void *queue;
> > + /* the ring queue */
> > + void *queue; /* virtual address */
> > + dma_addr_t queue_dma_addr; /* bus address */
> > + bool use_dma_api; /* are we using the DMA API? */
> >
> > /* the list node for the virtqueues list */
> > struct list_head node;
> > @@ -388,6 +390,50 @@ static int vp_request_intx(struct virtio_device *vdev)
> > return err;
>...
2016 Feb 02
1
[PATCH v6 6/9] virtio: Add improved queue allocation API
...g.c
> @@ -95,6 +95,11 @@ struct vring_virtqueue {
> /* How to notify other side. FIXME: commonalize hcalls! */
> bool (*notify)(struct virtqueue *vq);
>
> + /* DMA, allocation, and size information */
> + bool we_own_ring;
> + size_t queue_size_in_bytes;
> + dma_addr_t queue_dma_addr;
> +
> #ifdef DEBUG
> /* They're supposed to lock for us. */
> unsigned int in_use;
> @@ -878,36 +883,31 @@ irqreturn_t vring_interrupt(int irq, void *_vq)
> }
> EXPORT_SYMBOL_GPL(vring_interrupt);
>
> -struct virtqueue *vring_new_virtqueue(unsigned int index...
2016 Feb 02
1
[PATCH v6 6/9] virtio: Add improved queue allocation API
...g.c
> @@ -95,6 +95,11 @@ struct vring_virtqueue {
> /* How to notify other side. FIXME: commonalize hcalls! */
> bool (*notify)(struct virtqueue *vq);
>
> + /* DMA, allocation, and size information */
> + bool we_own_ring;
> + size_t queue_size_in_bytes;
> + dma_addr_t queue_dma_addr;
> +
> #ifdef DEBUG
> /* They're supposed to lock for us. */
> unsigned int in_use;
> @@ -878,36 +883,31 @@ irqreturn_t vring_interrupt(int irq, void *_vq)
> }
> EXPORT_SYMBOL_GPL(vring_interrupt);
>
> -struct virtqueue *vring_new_virtqueue(unsigned int index...
2016 Feb 01
0
[PATCH v6 6/9] virtio: Add improved queue allocation API
...o_ring.c
+++ b/drivers/virtio/virtio_ring.c
@@ -95,6 +95,11 @@ struct vring_virtqueue {
/* How to notify other side. FIXME: commonalize hcalls! */
bool (*notify)(struct virtqueue *vq);
+ /* DMA, allocation, and size information */
+ bool we_own_ring;
+ size_t queue_size_in_bytes;
+ dma_addr_t queue_dma_addr;
+
#ifdef DEBUG
/* They're supposed to lock for us. */
unsigned int in_use;
@@ -878,36 +883,31 @@ irqreturn_t vring_interrupt(int irq, void *_vq)
}
EXPORT_SYMBOL_GPL(vring_interrupt);
-struct virtqueue *vring_new_virtqueue(unsigned int index,
- unsigned int num,
- uns...
2018 Sep 07
3
[PATCH net-next v2 2/5] virtio_ring: support creating packed ring
...return NULL;
>
> - vq->vring = vring;
> vq->vq.callback = callback;
> vq->vq.vdev = vdev;
> vq->vq.name = name;
> - vq->vq.num_free = vring.num;
> + vq->vq.num_free = num;
> vq->vq.index = index;
> vq->we_own_ring = false;
> vq->queue_dma_addr = 0;
> @@ -983,9 +1199,8 @@ struct virtqueue *__vring_new_virtqueue(unsigned int index,
> vq->weak_barriers = weak_barriers;
> vq->broken = false;
> vq->last_used_idx = 0;
> - vq->avail_flags_shadow = 0;
> - vq->avail_idx_shadow = 0;
> vq->num_added =...
2018 Sep 07
3
[PATCH net-next v2 2/5] virtio_ring: support creating packed ring
...return NULL;
>
> - vq->vring = vring;
> vq->vq.callback = callback;
> vq->vq.vdev = vdev;
> vq->vq.name = name;
> - vq->vq.num_free = vring.num;
> + vq->vq.num_free = num;
> vq->vq.index = index;
> vq->we_own_ring = false;
> vq->queue_dma_addr = 0;
> @@ -983,9 +1199,8 @@ struct virtqueue *__vring_new_virtqueue(unsigned int index,
> vq->weak_barriers = weak_barriers;
> vq->broken = false;
> vq->last_used_idx = 0;
> - vq->avail_flags_shadow = 0;
> - vq->avail_idx_shadow = 0;
> vq->num_added =...
2018 Sep 10
0
[PATCH net-next v2 2/5] virtio_ring: support creating packed ring
...EXPORT_SYMBOL_GPL(vring_new_virtqueue);
> >
> > @@ -1142,7 +1408,9 @@ void vring_del_virtqueue(struct virtqueue *_vq)
> >
> > if (vq->we_own_ring) {
> > vring_free_queue(vq->vq.vdev, vq->queue_size_in_bytes,
> > - vq->vring.desc, vq->queue_dma_addr);
> > + vq->packed ? (void *)vq->vring_packed.desc :
> > + (void *)vq->vring.desc,
> > + vq->queue_dma_addr);
> > }
> > list_del(&_vq->list);
> > kfree(vq);
> > @@ -1184,7 +1452,7 @@ unsigned int virtqueue_get_vrin...
2015 Oct 30
13
[PATCH v4 0/6] virtio core DMA API conversion
This switches virtio to use the DMA API unconditionally. I'm sure
it breaks things, but it seems to work on x86 using virtio-pci, with
and without Xen, and using both the modern 1.0 variant and the
legacy variant.
This appears to work on native and Xen x86_64 using both modern and
legacy virtio-pci. It also appears to work on arm and arm64.
It definitely won't work as-is on s390x, and
2015 Oct 30
13
[PATCH v4 0/6] virtio core DMA API conversion
This switches virtio to use the DMA API unconditionally. I'm sure
it breaks things, but it seems to work on x86 using virtio-pci, with
and without Xen, and using both the modern 1.0 variant and the
legacy variant.
This appears to work on native and Xen x86_64 using both modern and
legacy virtio-pci. It also appears to work on arm and arm64.
It definitely won't work as-is on s390x, and