Displaying 20 results from an estimated 134 matches for "msix_vec".
2017 Feb 07
2
[PATCH 1/9] virtio_pci: remove struct virtio_pci_vq_info
On 2017?02?06? 01:15, Christoph Hellwig wrote:
> We don't really need struct virtio_pci_vq_info, as most field in there
> are redundant:
>
> - the vq backpointer is not strictly neede to start with
> - the entry in the vqs list is not needed - the generic virtqueue already
> has list, we only need to check if it has a callback to get the same
> semantics
>
2017 Feb 07
2
[PATCH 1/9] virtio_pci: remove struct virtio_pci_vq_info
On 2017?02?06? 01:15, Christoph Hellwig wrote:
> We don't really need struct virtio_pci_vq_info, as most field in there
> are redundant:
>
> - the vq backpointer is not strictly neede to start with
> - the entry in the vqs list is not needed - the generic virtqueue already
> has list, we only need to check if it has a callback to get the same
> semantics
>
2009 Sep 21
0
[PATCH 1/6] virtio_pci: minor MSI-X cleanups
1) Rename vp_request_vectors to vp_request_msix_vectors, and take
non-MSI-X case out to caller.
2) Comment weird pci_enable_msix API
3) Rename vp_find_vq to setup_vq.
4) Fix spaces to tabs
5) Make nvectors calc internal to vp_try_to_find_vqs()
6) Rename vector to msix_vector for more clarity.
Signed-off-by: Rusty Russell <rusty at rustcorp.co...
2009 Sep 21
0
[PATCH 1/6] virtio_pci: minor MSI-X cleanups
1) Rename vp_request_vectors to vp_request_msix_vectors, and take
non-MSI-X case out to caller.
2) Comment weird pci_enable_msix API
3) Rename vp_find_vq to setup_vq.
4) Fix spaces to tabs
5) Make nvectors calc internal to vp_try_to_find_vqs()
6) Rename vector to msix_vector for more clarity.
Signed-off-by: Rusty Russell <rusty at rustcorp.co...
2014 Dec 08
0
[PATCH v2 06/10] virtio_pci: setup vqs indirectly
...vice {
/* Whether we have vector per vq */
bool per_vq_vectors;
+ struct virtqueue *(*setup_vq)(struct virtio_pci_device *vp_dev,
+ struct virtio_pci_vq_info *info,
+ unsigned idx,
+ void (*callback)(struct virtqueue *vq),
+ const char *name,
+ u16 msix_vec);
void (*del_vq)(struct virtio_pci_vq_info *info);
};
@@ -389,15 +395,15 @@ static int vp_request_intx(struct virtio_device *vdev)
return err;
}
-static struct virtqueue *setup_vq(struct virtio_device *vdev, unsigned index,
+static struct virtqueue *setup_vq(struct virtio_pci_device *vp_d...
2014 Dec 08
0
[PATCH v2 06/10] virtio_pci: setup vqs indirectly
...vice {
/* Whether we have vector per vq */
bool per_vq_vectors;
+ struct virtqueue *(*setup_vq)(struct virtio_pci_device *vp_dev,
+ struct virtio_pci_vq_info *info,
+ unsigned idx,
+ void (*callback)(struct virtqueue *vq),
+ const char *name,
+ u16 msix_vec);
void (*del_vq)(struct virtio_pci_vq_info *info);
};
@@ -389,15 +395,15 @@ static int vp_request_intx(struct virtio_device *vdev)
return err;
}
-static struct virtqueue *setup_vq(struct virtio_device *vdev, unsigned index,
+static struct virtqueue *setup_vq(struct virtio_pci_device *vp_d...
2017 Jan 27
0
[PATCH 1/9] virtio_pci: remove struct virtio_pci_vq_info
...;vq) == IRQ_HANDLED)
+ list_for_each_entry(vq, &vp_dev->vdev.vqs, list) {
+ if (vq->callback && vring_interrupt(irq, vq) == IRQ_HANDLED)
ret = IRQ_HANDLED;
}
- spin_unlock_irqrestore(&vp_dev->lock, flags);
return ret;
}
@@ -167,55 +164,6 @@ static int vp_request_msix_vectors(struct virtio_device *vdev, int nvectors,
return err;
}
-static struct virtqueue *vp_setup_vq(struct virtio_device *vdev, unsigned index,
- void (*callback)(struct virtqueue *vq),
- const char *name,
- u16 msix_vec)
-{
- struct virtio_pci_device *vp_dev = to_vp_devi...
2017 Feb 05
0
[PATCH 1/9] virtio_pci: remove struct virtio_pci_vq_info
...;vq) == IRQ_HANDLED)
+ list_for_each_entry(vq, &vp_dev->vdev.vqs, list) {
+ if (vq->callback && vring_interrupt(irq, vq) == IRQ_HANDLED)
ret = IRQ_HANDLED;
}
- spin_unlock_irqrestore(&vp_dev->lock, flags);
return ret;
}
@@ -167,55 +164,6 @@ static int vp_request_msix_vectors(struct virtio_device *vdev, int nvectors,
return err;
}
-static struct virtqueue *vp_setup_vq(struct virtio_device *vdev, unsigned index,
- void (*callback)(struct virtqueue *vq),
- const char *name,
- u16 msix_vec)
-{
- struct virtio_pci_device *vp_dev = to_vp_devi...
2017 Feb 07
0
[PATCH 1/9] virtio_pci: remove struct virtio_pci_vq_info
...ing_interrupt(irq, info->vq) == IRQ_HANDLED)
+ list_for_each_entry(vq, &vp_dev->vdev.vqs, list) {
+ if (vring_interrupt(irq, vq) == IRQ_HANDLED)
ret = IRQ_HANDLED;
}
- spin_unlock_irqrestore(&vp_dev->lock, flags);
return ret;
}
@@ -167,55 +164,6 @@ static int vp_request_msix_vectors(struct virtio_device *vdev, int nvectors,
return err;
}
-static struct virtqueue *vp_setup_vq(struct virtio_device *vdev, unsigned index,
- void (*callback)(struct virtqueue *vq),
- const char *name,
- u16 msix_vec)
-{
- struct virtio_pci_device *vp_dev = to_vp_devi...
2017 Jan 27
0
[PATCH 2/9] virtio_pci: use shared interrupts for virtqueues
....c
+++ b/drivers/virtio/virtio_pci_common.c
@@ -33,10 +33,8 @@ void vp_synchronize_vectors(struct virtio_device *vdev)
struct virtio_pci_device *vp_dev = to_vp_device(vdev);
int i;
- if (vp_dev->intx_enabled)
- synchronize_irq(vp_dev->pci_dev->irq);
-
- for (i = 0; i < vp_dev->msix_vectors; ++i)
+ synchronize_irq(pci_irq_vector(vp_dev->pci_dev, 0));
+ for (i = 1; i < vp_dev->msix_vectors; i++)
synchronize_irq(pci_irq_vector(vp_dev->pci_dev, i));
}
@@ -99,77 +97,10 @@ static irqreturn_t vp_interrupt(int irq, void *opaque)
return vp_vring_interrupt(irq, opaque);...
2017 Feb 05
0
[PATCH 2/9] virtio_pci: use shared interrupts for virtqueues
....c
+++ b/drivers/virtio/virtio_pci_common.c
@@ -33,10 +33,8 @@ void vp_synchronize_vectors(struct virtio_device *vdev)
struct virtio_pci_device *vp_dev = to_vp_device(vdev);
int i;
- if (vp_dev->intx_enabled)
- synchronize_irq(vp_dev->pci_dev->irq);
-
- for (i = 0; i < vp_dev->msix_vectors; ++i)
+ synchronize_irq(pci_irq_vector(vp_dev->pci_dev, 0));
+ for (i = 1; i < vp_dev->msix_vectors; i++)
synchronize_irq(pci_irq_vector(vp_dev->pci_dev, i));
}
@@ -99,77 +97,10 @@ static irqreturn_t vp_interrupt(int irq, void *opaque)
return vp_vring_interrupt(irq, opaque);...
2016 Nov 06
8
virtio_pci irq handling cleanups
Hi Michael,
this series contains a couple cleanups for the virtio_pci interrupt
handling code, including a switch to the new pci_irq_alloc_vectors
helper. All these are in preparation of taking advantage of the new
PCI layer / core IRQ interrupt affinity handling, for which I will
send out a series once this and some core interrupt handling changes
are in.
2016 Nov 06
8
virtio_pci irq handling cleanups
Hi Michael,
this series contains a couple cleanups for the virtio_pci interrupt
handling code, including a switch to the new pci_irq_alloc_vectors
helper. All these are in preparation of taking advantage of the new
PCI layer / core IRQ interrupt affinity handling, for which I will
send out a series once this and some core interrupt handling changes
are in.
2017 Feb 03
2
[PATCH 2/9] virtio_pci: use shared interrupts for virtqueues
On 2017?01?27? 16:16, Christoph Hellwig wrote:
> + snprintf(vp_dev->msix_names[i + 1],
> + sizeof(*vp_dev->msix_names), "%s-%s",
> dev_name(&vp_dev->vdev.dev), names[i]);
> err = request_irq(pci_irq_vector(vp_dev->pci_dev, msix_vec),
> - vring_interrupt, 0,
> - vp_dev->msix_names[msix_vec],
> - vqs[i]);
> + vring_interrupt, IRQF_SHARED,
> + vp_dev->msix_names[i + 1], vqs[i]);
Do we need to check per_vq_vectors before dereferencing msix_names[i + 1] ?
Thanks
2017 Feb 03
2
[PATCH 2/9] virtio_pci: use shared interrupts for virtqueues
On 2017?01?27? 16:16, Christoph Hellwig wrote:
> + snprintf(vp_dev->msix_names[i + 1],
> + sizeof(*vp_dev->msix_names), "%s-%s",
> dev_name(&vp_dev->vdev.dev), names[i]);
> err = request_irq(pci_irq_vector(vp_dev->pci_dev, msix_vec),
> - vring_interrupt, 0,
> - vp_dev->msix_names[msix_vec],
> - vqs[i]);
> + vring_interrupt, IRQF_SHARED,
> + vp_dev->msix_names[i + 1], vqs[i]);
Do we need to check per_vq_vectors before dereferencing msix_names[i + 1] ?
Thanks
2012 Feb 01
0
[PATCH 1/2] virtio-pci: add setup_vqs flag in vp_try_to_find_vqs
...rs/virtio/virtio_pci.c
> +++ b/drivers/virtio/virtio_pci.c
> @@ -492,9 +492,11 @@ static void vp_del_vqs(struct virtio_device *vdev)
> list_for_each_entry_safe(vq, n, &vdev->vqs, list) {
> info = vq->priv;
> if (vp_dev->per_vq_vectors &&
> - info->msix_vector != VIRTIO_MSI_NO_VECTOR)
> + info->msix_vector != VIRTIO_MSI_NO_VECTOR) {
> free_irq(vp_dev->msix_entries[info->msix_vector].vector,
> vq);
> + vp_dev->msix_used_vectors--;
> + }
> vp_del_vq(vq);
> }
> vp_dev->per_vq_vectors = false;
&...
2012 Feb 01
0
[PATCH 1/2] virtio-pci: add setup_vqs flag in vp_try_to_find_vqs
...rs/virtio/virtio_pci.c
> +++ b/drivers/virtio/virtio_pci.c
> @@ -492,9 +492,11 @@ static void vp_del_vqs(struct virtio_device *vdev)
> list_for_each_entry_safe(vq, n, &vdev->vqs, list) {
> info = vq->priv;
> if (vp_dev->per_vq_vectors &&
> - info->msix_vector != VIRTIO_MSI_NO_VECTOR)
> + info->msix_vector != VIRTIO_MSI_NO_VECTOR) {
> free_irq(vp_dev->msix_entries[info->msix_vector].vector,
> vq);
> + vp_dev->msix_used_vectors--;
> + }
> vp_del_vq(vq);
> }
> vp_dev->per_vq_vectors = false;
&...
2017 Feb 05
13
automatic IRQ affinity for virtio V3
...handling
code, and then converts the virtio PCI code to use the automatic MSI-X
vectors spreading, as well as using the information in virtio-blk
and virtio-scsi to automatically align the blk-mq queues to the MSI-X
vectors.
Changes since V2:
- remove a redundant callback check
- calculate ->msix_vectors correctly
- add a few Reviewed-by: tags for Jason
Changes since V1:
- dropped the patches already merged for 4.10-rc
- new patch to remove struct virtio_pci_vq_info
- improve probe error handling by unwinding step by step
- new patch to convert virtio-scsi
2017 Feb 05
13
automatic IRQ affinity for virtio V3
...handling
code, and then converts the virtio PCI code to use the automatic MSI-X
vectors spreading, as well as using the information in virtio-blk
and virtio-scsi to automatically align the blk-mq queues to the MSI-X
vectors.
Changes since V2:
- remove a redundant callback check
- calculate ->msix_vectors correctly
- add a few Reviewed-by: tags for Jason
Changes since V1:
- dropped the patches already merged for 4.10-rc
- new patch to remove struct virtio_pci_vq_info
- improve probe error handling by unwinding step by step
- new patch to convert virtio-scsi
2011 Dec 08
14
[PATCH 0/11] RFC: PCI using capabilitities
Here's the patch series I ended up with. I haven't coded up the QEMU
side yet, so no idea if the new driver works.
Questions:
(1) Do we win from separating ISR, NOTIFY and COMMON?
(2) I used a "u8 bar"; should I use a bir and pack it instead? BIR
seems a little obscure (noone else in the kernel source seems to
refer to it).
Cheers,
Rusty.