Displaying 20 results from an estimated 269 matches for "vring_del_virtqueue".
2023 Apr 02
1
[PATCH v6] virtio: add VIRTIO_F_NOTIFICATION_DATA feature support
Hi Viktor,
> diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
> index 4c3bb0ddeb9b..f9c6604352b4 100644
> --- a/drivers/virtio/virtio_ring.c
> +++ b/drivers/virtio/virtio_ring.c
> @@ -2752,6 +2752,23 @@ void vring_del_virtqueue(struct virtqueue *_vq)
> }
> EXPORT_SYMBOL_GPL(vring_del_virtqueue);
>
> +u32 vring_notification_data(struct virtqueue *_vq)
> +{
> + struct vring_virtqueue *vq = to_vvq(_vq);
> + u16 next;
> +
> + if (vq->packed_ring)
> + next = (...
2020 Mar 06
1
[PATCH] virtio_ring: Fix mem leak with vring_new_virtqueue()
...it ring separately") allocates the desc
>>>> state
>>>> within the __vring_new_virtqueue() but frees it only when the
>>>> .we_own_ring
>>>> flag is set. This leads to a memory leak when freeing such allocated
>>>> virtqueues with the vring_del_virtqueue() function.
>>>>
>>>> Fix this by moving the desc_state free code outside the flag and only
>>>> for split rings. Issue was discovered during testing with remoteproc
>>>> and virtio_rpmsg.
>>>>
>>>> Fixes: cbeedb72b97a ("v...
2023 Mar 23
1
[PATCH v4] virtio: add VIRTIO_F_NOTIFICATION_DATA feature support
...k, name);
> if (!vq)
> return ERR_PTR(-ENOMEM);
>
> diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
> index 4c3bb0ddeb9b..837875cc3190 100644
> --- a/drivers/virtio/virtio_ring.c
> +++ b/drivers/virtio/virtio_ring.c
> @@ -2752,6 +2752,21 @@ void vring_del_virtqueue(struct virtqueue *_vq)
> }
> EXPORT_SYMBOL_GPL(vring_del_virtqueue);
>
> +u32 vring_notification_data(struct virtqueue *_vq)
> +{
> + struct vring_virtqueue *vq = to_vvq(_vq);
> + u16 next;
> +
> + if (vq->packed_ring)
> + next = (vq->packed.next_avail_idx &am...
2023 Mar 23
1
[PATCH v4] virtio: add VIRTIO_F_NOTIFICATION_DATA feature support
...gt; > >
> > > diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
> > > index 4c3bb0ddeb9b..837875cc3190 100644
> > > --- a/drivers/virtio/virtio_ring.c
> > > +++ b/drivers/virtio/virtio_ring.c
> > > @@ -2752,6 +2752,21 @@ void vring_del_virtqueue(struct virtqueue *_vq)
> > > }
> > > EXPORT_SYMBOL_GPL(vring_del_virtqueue);
> > >
> > > +u32 vring_notification_data(struct virtqueue *_vq)
> > > +{
> > > + struct vring_virtqueue *vq = to_vvq(_vq);
> > > + u16 next;
> >...
2016 Feb 01
0
[PATCH v6 6/9] virtio: Add improved queue allocation API
...void (*callback)(struct virtqueue *vq),
+ const char *name)
+{
+ struct vring vring;
+ vring_init(&vring, num, pages, vring_align);
+ return __vring_new_virtqueue(index, vring, vdev, weak_barriers,
+ notify, callback, name);
+}
EXPORT_SYMBOL_GPL(vring_new_virtqueue);
-void vring_del_virtqueue(struct virtqueue *vq)
+void vring_del_virtqueue(struct virtqueue *_vq)
{
- list_del(&vq->list);
- kfree(to_vvq(vq));
+ struct vring_virtqueue *vq = to_vvq(_vq);
+
+ if (vq->we_own_ring) {
+ dma_free_coherent(vring_dma_dev(vq), vq->queue_size_in_bytes,
+ vq->vring.desc, vq->...
2016 Feb 01
14
[PATCH v6 0/9] virtio DMA API, yet again
This switches virtio to use the DMA API on Xen and if requested by
module option.
This fixes virtio on Xen, and it should break anything because it's
off by default on everything except Xen PV on x86.
To the Xen people: is this okay? If it doesn't work on other Xen
variants (PVH? HVM?), can you submit follow-up patches to fix it?
To everyone else: we've waffled on this for way too
2016 Feb 01
14
[PATCH v6 0/9] virtio DMA API, yet again
This switches virtio to use the DMA API on Xen and if requested by
module option.
This fixes virtio on Xen, and it should break anything because it's
off by default on everything except Xen PV on x86.
To the Xen people: is this okay? If it doesn't work on other Xen
variants (PVH? HVM?), can you submit follow-up patches to fix it?
To everyone else: we've waffled on this for way too
2023 Mar 21
0
[PATCH v2] virtio: add VIRTIO_F_NOTIFICATION_DATA feature support
...name);
> if (!vq)
> return ERR_PTR(-ENOMEM);
>
> diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
> index 723c4e29e1d3..5e9e1800bb6e 100644
> --- a/drivers/virtio/virtio_ring.c
> +++ b/drivers/virtio/virtio_ring.c
> @@ -2699,6 +2699,21 @@ void vring_del_virtqueue(struct virtqueue *_vq)
> }
> EXPORT_SYMBOL_GPL(vring_del_virtqueue);
>
> +u32 vring_fill_notification_data(struct virtqueue *_vq)
btw what does "fill" mean here? why not just vring_notification_data?
> +{
> + struct vring_virtqueue *vq = to_vvq(_vq);
> + u16 nex...
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
2023 Mar 21
0
[PATCH v2] virtio: add VIRTIO_F_NOTIFICATION_DATA feature support
...name);
> if (!vq)
> return ERR_PTR(-ENOMEM);
>
> diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
> index 723c4e29e1d3..5e9e1800bb6e 100644
> --- a/drivers/virtio/virtio_ring.c
> +++ b/drivers/virtio/virtio_ring.c
> @@ -2699,6 +2699,21 @@ void vring_del_virtqueue(struct virtqueue *_vq)
> }
> EXPORT_SYMBOL_GPL(vring_del_virtqueue);
>
> +u32 vring_fill_notification_data(struct virtqueue *_vq)
> +{
> + struct vring_virtqueue *vq = to_vvq(_vq);
> + u16 next;
> +
> + if (vq->packed_ring)
> + next = (vq->packed.next_avail_...
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
2023 Mar 21
0
[PATCH v3] virtio: add VIRTIO_F_NOTIFICATION_DATA feature support
...name);
> if (!vq)
> return ERR_PTR(-ENOMEM);
>
> diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
> index 4c3bb0ddeb9b..837875cc3190 100644
> --- a/drivers/virtio/virtio_ring.c
> +++ b/drivers/virtio/virtio_ring.c
> @@ -2752,6 +2752,21 @@ void vring_del_virtqueue(struct virtqueue *_vq)
> }
> EXPORT_SYMBOL_GPL(vring_del_virtqueue);
>
> +u32 vring_notification_data(struct virtqueue *_vq)
> +{
> + struct vring_virtqueue *vq = to_vvq(_vq);
> + u16 next;
> +
> + if (vq->packed_ring)
> + next = (vq->packed.next_avail_idx &...
2007 Dec 21
0
[kvm-devel] [Virtio-for-kvm] [PATCH 3/13] [Mostly resend] virtio additions
...T_SYMBOL_GPL(vring_interrupt);
+
static struct virtqueue_ops vring_vq_ops = {
.add_buf = vring_add_buf,
.get_buf = vring_get_buf,
@@ -312,8 +314,12 @@ struct virtqueue *vring_new_virtqueue(unsigned int num,
return &vq->vq;
}
+EXPORT_SYMBOL_GPL(vring_new_virtqueue);
+
void vring_del_virtqueue(struct virtqueue *vq)
{
kfree(to_vvq(vq));
}
+EXPORT_SYMBOL_GPL(vring_del_virtqueue);
+
--
1.5.3.3
2007 Nov 07
1
[PATCH 0/3] virtio PCI driver
This patch series implements a PCI driver for virtio. This allows virtio
devices (like block and network) to be used in QEMU/KVM. I'll post a very
early KVM userspace backend in kvm-devel for those that are interested.
This series depends on the two virtio fixes I've posted and Rusty's config_ops
refactoring. I've tested with these patches on Rusty's experimental virtio
2007 Nov 07
1
[PATCH 0/3] virtio PCI driver
This patch series implements a PCI driver for virtio. This allows virtio
devices (like block and network) to be used in QEMU/KVM. I'll post a very
early KVM userspace backend in kvm-devel for those that are interested.
This series depends on the two virtio fixes I've posted and Rusty's config_ops
refactoring. I've tested with these patches on Rusty's experimental virtio
2007 Dec 21
0
[kvm-devel] [Virtio-for-kvm] [PATCH 3/13] [Mostly resend] virtio additions
...T_SYMBOL_GPL(vring_interrupt);
+
static struct virtqueue_ops vring_vq_ops = {
.add_buf = vring_add_buf,
.get_buf = vring_get_buf,
@@ -312,8 +314,12 @@ struct virtqueue *vring_new_virtqueue(unsigned int num,
return &vq->vq;
}
+EXPORT_SYMBOL_GPL(vring_new_virtqueue);
+
void vring_del_virtqueue(struct virtqueue *vq)
{
kfree(to_vvq(vq));
}
+EXPORT_SYMBOL_GPL(vring_del_virtqueue);
+
--
1.5.3.3
2023 Mar 23
0
[PATCH v5] virtio: add VIRTIO_F_NOTIFICATION_DATA feature support
...k, name);
> if (!vq)
> return ERR_PTR(-ENOMEM);
>
> diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
> index 4c3bb0ddeb9b..837875cc3190 100644
> --- a/drivers/virtio/virtio_ring.c
> +++ b/drivers/virtio/virtio_ring.c
> @@ -2752,6 +2752,21 @@ void vring_del_virtqueue(struct virtqueue *_vq)
> }
> EXPORT_SYMBOL_GPL(vring_del_virtqueue);
>
> +u32 vring_notification_data(struct virtqueue *_vq)
> +{
> + struct vring_virtqueue *vq = to_vvq(_vq);
> + u16 next;
> +
> + if (vq->packed_ring)
> + next = (vq->packed.next_avail_idx &am...
2023 Apr 04
2
[PATCH v6] virtio: add VIRTIO_F_NOTIFICATION_DATA feature support
...aro Karsz wrote:
> Hi Viktor,
>
> > diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
> > index 4c3bb0ddeb9b..f9c6604352b4 100644
> > --- a/drivers/virtio/virtio_ring.c
> > +++ b/drivers/virtio/virtio_ring.c
> > @@ -2752,6 +2752,23 @@ void vring_del_virtqueue(struct virtqueue *_vq)
> > }
> > EXPORT_SYMBOL_GPL(vring_del_virtqueue);
> >
> > +u32 vring_notification_data(struct virtqueue *_vq)
> > +{
> > + struct vring_virtqueue *vq = to_vvq(_vq);
> > + u16 next;
> > +
> > + if (vq-&...
2019 Apr 26
0
[PATCH 01/10] virtio/s390: use vring_create_virtqueue
..._device *vcdev = to_vc_device(vq->vdev);
struct virtio_ccw_vq_info *info = vq->priv;
unsigned long flags;
- unsigned long size;
int ret;
unsigned int index = vq->index;
@@ -461,8 +459,6 @@ static void virtio_ccw_del_vq(struct virtqueue *vq, struct ccw1 *ccw)
ret, index);
vring_del_virtqueue(vq);
- size = PAGE_ALIGN(vring_size(info->num, KVM_VIRTIO_CCW_RING_ALIGN));
- free_pages_exact(info->queue, size);
kfree(info->info_block);
kfree(info);
}
@@ -494,8 +490,9 @@ static struct virtqueue *virtio_ccw_setup_vq(struct virtio_device *vdev,
int err;
struct virtqueue *vq = N...
2016 Feb 02
1
[PATCH v6 6/9] virtio: Add improved queue allocation API
...const char *name)
> +{
> + struct vring vring;
> + vring_init(&vring, num, pages, vring_align);
> + return __vring_new_virtqueue(index, vring, vdev, weak_barriers,
> + notify, callback, name);
> +}
> EXPORT_SYMBOL_GPL(vring_new_virtqueue);
>
> -void vring_del_virtqueue(struct virtqueue *vq)
> +void vring_del_virtqueue(struct virtqueue *_vq)
> {
> - list_del(&vq->list);
> - kfree(to_vvq(vq));
> + struct vring_virtqueue *vq = to_vvq(_vq);
> +
> + if (vq->we_own_ring) {
> + dma_free_coherent(vring_dma_dev(vq), vq->queue_size_in...