search for: vm_del_vq

Displaying 20 results from an estimated 53 matches for "vm_del_vq".

2014 Nov 06
2
[RFC PATCH] virtio-mmio: support for multiple irqs
...pt(irq, info->vq); >> - spin_unlock_irqrestore(&vm_dev->lock, flags); >> - } >> + if (likely(status & VIRTIO_MMIO_INT_VRING)) >> + return vm_vring_interrupt(irq, opaque); >> >> return ret; >> } >> @@ -284,18 +313,98 @@ static void vm_del_vq(struct virtqueue *vq) >> kfree(info); >> } >> >> -static void vm_del_vqs(struct virtio_device *vdev) >> +static void vm_free_irqs(struct virtio_device *vdev) >> { >> + int i; >> struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev);...
2014 Nov 06
2
[RFC PATCH] virtio-mmio: support for multiple irqs
...pt(irq, info->vq); >> - spin_unlock_irqrestore(&vm_dev->lock, flags); >> - } >> + if (likely(status & VIRTIO_MMIO_INT_VRING)) >> + return vm_vring_interrupt(irq, opaque); >> >> return ret; >> } >> @@ -284,18 +313,98 @@ static void vm_del_vq(struct virtqueue *vq) >> kfree(info); >> } >> >> -static void vm_del_vqs(struct virtio_device *vdev) >> +static void vm_free_irqs(struct virtio_device *vdev) >> { >> + int i; >> struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev);...
2014 Nov 06
0
[RFC PATCH] virtio-mmio: support for multiple irqs
...e) > - ret |= vring_interrupt(irq, info->vq); > - spin_unlock_irqrestore(&vm_dev->lock, flags); > - } > + if (likely(status & VIRTIO_MMIO_INT_VRING)) > + return vm_vring_interrupt(irq, opaque); > > return ret; > } > @@ -284,18 +313,98 @@ static void vm_del_vq(struct virtqueue *vq) > kfree(info); > } > > -static void vm_del_vqs(struct virtio_device *vdev) > +static void vm_free_irqs(struct virtio_device *vdev) > { > + int i; > struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); > + > + if (vm_dev->sin...
2014 Nov 06
0
[RFC PATCH] virtio-mmio: support for multiple irqs
...pin_unlock_irqrestore(&vm_dev->lock, flags); > >> - } > >> + if (likely(status & VIRTIO_MMIO_INT_VRING)) > >> + return vm_vring_interrupt(irq, opaque); > >> > >> return ret; > >> } > >> @@ -284,18 +313,98 @@ static void vm_del_vq(struct virtqueue *vq) > >> kfree(info); > >> } > >> > >> -static void vm_del_vqs(struct virtio_device *vdev) > >> +static void vm_free_irqs(struct virtio_device *vdev) > >> { > >> + int i; > >> struct virtio_mmio_device...
2014 Nov 04
6
[RFC PATCH] virtio-mmio: support for multiple irqs
...h_entry(info, &vm_dev->virtqueues, node) - ret |= vring_interrupt(irq, info->vq); - spin_unlock_irqrestore(&vm_dev->lock, flags); - } + if (likely(status & VIRTIO_MMIO_INT_VRING)) + return vm_vring_interrupt(irq, opaque); return ret; } @@ -284,18 +313,98 @@ static void vm_del_vq(struct virtqueue *vq) kfree(info); } -static void vm_del_vqs(struct virtio_device *vdev) +static void vm_free_irqs(struct virtio_device *vdev) { + int i; struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); + + if (vm_dev->single_irq_enabled) { + free_irq(platform_get_irq(vm...
2014 Nov 04
6
[RFC PATCH] virtio-mmio: support for multiple irqs
...h_entry(info, &vm_dev->virtqueues, node) - ret |= vring_interrupt(irq, info->vq); - spin_unlock_irqrestore(&vm_dev->lock, flags); - } + if (likely(status & VIRTIO_MMIO_INT_VRING)) + return vm_vring_interrupt(irq, opaque); return ret; } @@ -284,18 +313,98 @@ static void vm_del_vq(struct virtqueue *vq) kfree(info); } -static void vm_del_vqs(struct virtio_device *vdev) +static void vm_free_irqs(struct virtio_device *vdev) { + int i; struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); + + if (vm_dev->single_irq_enabled) { + free_irq(platform_get_irq(vm...
2017 Feb 04
0
[PATCH] virtio_mmio: remove virtio_mmio_vq_info
...fo->vq); - spin_unlock_irqrestore(&vm_dev->lock, flags); + struct virtqueue *vq; + + list_for_each_entry(vq, &vm_dev->vdev.vqs, list) + ret |= vring_interrupt(irq, vq); } return ret; @@ -315,14 +299,8 @@ static irqreturn_t vm_interrupt(int irq, void *opaque) static void vm_del_vq(struct virtqueue *vq) { struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vq->vdev); - struct virtio_mmio_vq_info *info = vq->priv; - unsigned long flags; unsigned int index = vq->index; - spin_lock_irqsave(&vm_dev->lock, flags); - list_del(&info->node); - spin...
2017 Feb 04
0
[PATCH] virtio_mmio: remove virtio_mmio_vq_info
...fo->vq); - spin_unlock_irqrestore(&vm_dev->lock, flags); + struct virtqueue *vq; + + list_for_each_entry(vq, &vm_dev->vdev.vqs, list) + ret |= vring_interrupt(irq, vq); } return ret; @@ -315,14 +299,8 @@ static irqreturn_t vm_interrupt(int irq, void *opaque) static void vm_del_vq(struct virtqueue *vq) { struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vq->vdev); - struct virtio_mmio_vq_info *info = vq->priv; - unsigned long flags; unsigned int index = vq->index; - spin_lock_irqsave(&vm_dev->lock, flags); - list_del(&info->node); - spin...
2023 Oct 10
1
[PATCH 2/2] virtio-mmio: Support multiple interrupts per device
...if (info->irq == irq) > + ret |= vring_interrupt(irq, info->vq); > + } > + spin_unlock_irqrestore(&vm_dev->lock, flags); > + } > + > return ret; > } > > @@ -356,11 +375,15 @@ static void vm_del_vqs(struct virtio_device *vdev) > { > struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); > struct virtqueue *vq, *n; > + int i, irq; > + > + for (i = 0; i < vm_dev->num_irqs; i++) { > + irq = vm_dev->irq_base + i; &...
2023 Oct 10
1
[PATCH 2/2] virtio-mmio: Support multiple interrupts per device
...if (info->irq == irq) > + ret |= vring_interrupt(irq, info->vq); > + } > + spin_unlock_irqrestore(&vm_dev->lock, flags); > + } > + > return ret; > } > > @@ -356,11 +375,15 @@ static void vm_del_vqs(struct virtio_device *vdev) > { > struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); > struct virtqueue *vq, *n; > + int i, irq; > + > + for (i = 0; i < vm_dev->num_irqs; i++) { > + irq = vm_dev->irq_base + i; &...
2011 Oct 27
1
[PATCH v3] virtio: Add platform bus driver for memory mapped virtio device
On Mon, 2011-10-24 at 03:33 +0100, Rusty Russell wrote: > No, that's it I think. Please send a diff for the documentation, since > I'm updating the LyX master and I've already applied your previous > version. Here it goes (below). Also do you think you would be able to merge the driver (corresponding v4 patch follows) in the 3.2 merge window that seems to have just opened?
2011 Oct 27
1
[PATCH v3] virtio: Add platform bus driver for memory mapped virtio device
On Mon, 2011-10-24 at 03:33 +0100, Rusty Russell wrote: > No, that's it I think. Please send a diff for the documentation, since > I'm updating the LyX master and I've already applied your previous > version. Here it goes (below). Also do you think you would be able to merge the driver (corresponding v4 patch follows) in the 3.2 merge window that seems to have just opened?
2014 Oct 25
1
[RFC PATCH 2/2] Assign a new irq handler while irqfd enabled
...ed(&vm_dev->vdev); + ret = IRQ_HANDLED; + } + + spin_lock_irqsave(&vm_dev->lock, flags); + list_for_each_entry(info, &vm_dev->virtqueues, node) + ret |= vring_interrupt(irq, info->vq); + spin_unlock_irqrestore(&vm_dev->lock, flags); + + return ret; +} static void vm_del_vq(struct virtqueue *vq) { @@ -391,6 +415,7 @@ error_available: return ERR_PTR(err); } +#define VIRTIO_MMIO_F_IRQFD (1 << 7) static int vm_find_vqs(struct virtio_device *vdev, unsigned nvqs, struct virtqueue *vqs[], vq_callback_t *callbacks[], @@ -400,8 +425,13...
2014 Oct 25
1
[RFC PATCH 2/2] Assign a new irq handler while irqfd enabled
...ed(&vm_dev->vdev); + ret = IRQ_HANDLED; + } + + spin_lock_irqsave(&vm_dev->lock, flags); + list_for_each_entry(info, &vm_dev->virtqueues, node) + ret |= vring_interrupt(irq, info->vq); + spin_unlock_irqrestore(&vm_dev->lock, flags); + + return ret; +} static void vm_del_vq(struct virtqueue *vq) { @@ -391,6 +415,7 @@ error_available: return ERR_PTR(err); } +#define VIRTIO_MMIO_F_IRQFD (1 << 7) static int vm_find_vqs(struct virtio_device *vdev, unsigned nvqs, struct virtqueue *vqs[], vq_callback_t *callbacks[], @@ -400,8 +425,13...
2014 Oct 27
1
[RFC PATCH 2/2] Assign a new irq handler while irqfd enabled
...e(&vm_dev->lock, flags); >> + list_for_each_entry(info, &vm_dev->virtqueues, node) >> + ret |= vring_interrupt(irq, info->vq); >> + spin_unlock_irqrestore(&vm_dev->lock, flags); >> + >> + return ret; >> +} >> >> static void vm_del_vq(struct virtqueue *vq) >> { > > So you invoke callbacks for all VQs. > This won't scale well as the number of VQs grows, will it? > >> @@ -391,6 +415,7 @@ error_available: >> return ERR_PTR(err); >> } >> >> +#define VIRTIO_MMIO_F_IRQFD...
2014 Oct 27
1
[RFC PATCH 2/2] Assign a new irq handler while irqfd enabled
...e(&vm_dev->lock, flags); >> + list_for_each_entry(info, &vm_dev->virtqueues, node) >> + ret |= vring_interrupt(irq, info->vq); >> + spin_unlock_irqrestore(&vm_dev->lock, flags); >> + >> + return ret; >> +} >> >> static void vm_del_vq(struct virtqueue *vq) >> { > > So you invoke callbacks for all VQs. > This won't scale well as the number of VQs grows, will it? > >> @@ -391,6 +415,7 @@ error_available: >> return ERR_PTR(err); >> } >> >> +#define VIRTIO_MMIO_F_IRQFD...
2014 Oct 26
0
[RFC PATCH 2/2] Assign a new irq handler while irqfd enabled
...} > + > + spin_lock_irqsave(&vm_dev->lock, flags); > + list_for_each_entry(info, &vm_dev->virtqueues, node) > + ret |= vring_interrupt(irq, info->vq); > + spin_unlock_irqrestore(&vm_dev->lock, flags); > + > + return ret; > +} > > static void vm_del_vq(struct virtqueue *vq) > { So you invoke callbacks for all VQs. This won't scale well as the number of VQs grows, will it? > @@ -391,6 +415,7 @@ error_available: > return ERR_PTR(err); > } > > +#define VIRTIO_MMIO_F_IRQFD (1 << 7) > static int vm_find_v...
2014 Oct 27
0
[RFC PATCH 2/2] Assign a new irq handler while irqfd enabled
...;> + list_for_each_entry(info, &vm_dev->virtqueues, node) > >> + ret |= vring_interrupt(irq, info->vq); > >> + spin_unlock_irqrestore(&vm_dev->lock, flags); > >> + > >> + return ret; > >> +} > >> > >> static void vm_del_vq(struct virtqueue *vq) > >> { > > > > So you invoke callbacks for all VQs. > > This won't scale well as the number of VQs grows, will it? > > > >> @@ -391,6 +415,7 @@ error_available: > >> return ERR_PTR(err); > >> } > >>...
2018 Dec 28
0
[PATCH v1 2/2] virtio: don't allocate vqs when names[i] = NULL
...s, return err; for (i = 0; i < nvqs; ++i) { - vqs[i] = vm_setup_vq(vdev, i, callbacks[i], names[i], + if (!names[i]) { + vqs[i] = NULL; + continue; + } + + vqs[i] = vm_setup_vq(vdev, queue_idx++, callbacks[i], names[i], ctx ? ctx[i] : false); if (IS_ERR(vqs[i])) { vm_del_vqs(vdev); -- 2.7.4
2012 Oct 16
6
[PATCH 1/5] virtio: move queue_index and num_free fields into core struct virtqueue.
...into the notification register to * signal the other end */ - writel(virtqueue_get_queue_index(vq), vm_dev->base + VIRTIO_MMIO_QUEUE_NOTIFY); + writel(vq->index, vm_dev->base + VIRTIO_MMIO_QUEUE_NOTIFY); } /* Notify all virtqueues on an interrupt. */ @@ -266,7 +266,7 @@ static void vm_del_vq(struct virtqueue *vq) struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vq->vdev); struct virtio_mmio_vq_info *info = vq->priv; unsigned long flags, size; - unsigned int index = virtqueue_get_queue_index(vq); + unsigned int index = vq->index; spin_lock_irqsave(&vm_dev...