search for: allocated_vectors

Displaying 20 results from an estimated 59 matches for "allocated_vectors".

2017 Mar 23
2
[REGRESSION] 07ec51480b5e ("virtio_pci: use shared interrupts for virtqueues") causes crashes in guest
...; +++ b/drivers/virtio/virtio_pci_common.c > @@ -147,7 +147,7 @@ static int vp_find_vqs_msix(struct virtio_device *vdev, unsigned nvqs, > { > struct virtio_pci_device *vp_dev = to_vp_device(vdev); > const char *name = dev_name(&vp_dev->vdev.dev); > - int i, err = -ENOMEM, allocated_vectors, nvectors; > + int i, j, err = -ENOMEM, allocated_vectors, nvectors; > unsigned flags = PCI_IRQ_MSIX; > bool shared = false; > u16 msix_vec; > @@ -212,7 +212,7 @@ static int vp_find_vqs_msix(struct virtio_device *vdev, unsigned nvqs, > if (!vp_dev->msix_vector_map) >...
2017 Mar 23
2
[REGRESSION] 07ec51480b5e ("virtio_pci: use shared interrupts for virtqueues") causes crashes in guest
...; +++ b/drivers/virtio/virtio_pci_common.c > @@ -147,7 +147,7 @@ static int vp_find_vqs_msix(struct virtio_device *vdev, unsigned nvqs, > { > struct virtio_pci_device *vp_dev = to_vp_device(vdev); > const char *name = dev_name(&vp_dev->vdev.dev); > - int i, err = -ENOMEM, allocated_vectors, nvectors; > + int i, j, err = -ENOMEM, allocated_vectors, nvectors; > unsigned flags = PCI_IRQ_MSIX; > bool shared = false; > u16 msix_vec; > @@ -212,7 +212,7 @@ static int vp_find_vqs_msix(struct virtio_device *vdev, unsigned nvqs, > if (!vp_dev->msix_vector_map) >...
2017 Mar 23
0
[REGRESSION] 07ec51480b5e ("virtio_pci: use shared interrupts for virtqueues") causes crashes in guest
...rtio_pci_common.c > > @@ -147,7 +147,7 @@ static int vp_find_vqs_msix(struct virtio_device *vdev, unsigned nvqs, > > { > > struct virtio_pci_device *vp_dev = to_vp_device(vdev); > > const char *name = dev_name(&vp_dev->vdev.dev); > > - int i, err = -ENOMEM, allocated_vectors, nvectors; > > + int i, j, err = -ENOMEM, allocated_vectors, nvectors; > > unsigned flags = PCI_IRQ_MSIX; > > bool shared = false; > > u16 msix_vec; > > @@ -212,7 +212,7 @@ static int vp_find_vqs_msix(struct virtio_device *vdev, unsigned nvqs, > > if (!vp...
2017 Jan 27
0
[PATCH 2/9] virtio_pci: use shared interrupts for virtqueues
...virtio_device *vdev, unsigned nvqs, @@ -219,8 +148,9 @@ static int vp_find_vqs_msix(struct virtio_device *vdev, unsigned nvqs, bool per_vq_vectors) { struct virtio_pci_device *vp_dev = to_vp_device(vdev); + const char *name = dev_name(&vp_dev->vdev.dev); + int i, err = -ENOMEM, allocated_vectors, nvectors; u16 msix_vec; - int i, err, nvectors, allocated_vectors; if (per_vq_vectors) { /* Best option: one for change interrupt, one per vq. */ @@ -233,65 +163,108 @@ static int vp_find_vqs_msix(struct virtio_device *vdev, unsigned nvqs, nvectors = 2; } - err = vp_request_msix_ve...
2017 Feb 05
0
[PATCH 2/9] virtio_pci: use shared interrupts for virtqueues
...rtio_device *vdev, unsigned nvqs, @@ -219,79 +148,122 @@ static int vp_find_vqs_msix(struct virtio_device *vdev, unsigned nvqs, bool per_vq_vectors) { struct virtio_pci_device *vp_dev = to_vp_device(vdev); + const char *name = dev_name(&vp_dev->vdev.dev); + int i, err = -ENOMEM, allocated_vectors, nvectors; u16 msix_vec; - int i, err, nvectors, allocated_vectors; + + nvectors = 1; + for (i = 0; i < nvqs; i++) + if (callbacks[i]) + nvectors++; if (per_vq_vectors) { - /* Best option: one for change interrupt, one per vq. */ - nvectors = 1; - for (i = 0; i < nvqs; ++i) - if...
2017 Mar 23
3
[REGRESSION] 07ec51480b5e ("virtio_pci: use shared interrupts for virtqueues") causes crashes in guest
Hi, Fedora has received multiple reports of crashes when running 4.11 as a guest https://bugzilla.redhat.com/show_bug.cgi?id=1430297 https://bugzilla.redhat.com/show_bug.cgi?id=1434462 https://bugzilla.kernel.org/show_bug.cgi?id=194911 https://bugzilla.redhat.com/show_bug.cgi?id=1433899 The crashes are not always consistent but they are generally some flavor of oops or GPF in virtio related
2017 Mar 23
3
[REGRESSION] 07ec51480b5e ("virtio_pci: use shared interrupts for virtqueues") causes crashes in guest
Hi, Fedora has received multiple reports of crashes when running 4.11 as a guest https://bugzilla.redhat.com/show_bug.cgi?id=1430297 https://bugzilla.redhat.com/show_bug.cgi?id=1434462 https://bugzilla.kernel.org/show_bug.cgi?id=194911 https://bugzilla.redhat.com/show_bug.cgi?id=1433899 The crashes are not always consistent but they are generally some flavor of oops or GPF in virtio related
2009 Sep 21
0
[PATCH 1/6] virtio_pci: minor MSI-X cleanups
..._try_to_find_vqs(struct vir struct virtqueue *vqs[], vq_callback_t *callbacks[], const char *names[], - int nvectors, + bool use_msix, bool per_vq_vectors) { struct virtio_pci_device *vp_dev = to_vp_device(vdev); - u16 vector; - int i, err, allocated_vectors; + u16 msix_vec; + int i, err, nvectors, allocated_vectors; - err = vp_request_vectors(vdev, nvectors, per_vq_vectors); - if (err) - goto error_request; + if (!use_msix) { + /* Old style: one normal interrupt for change and all vqs. */ + err = vp_request_intx(vdev); + if (err) + goto error_...
2009 Sep 21
0
[PATCH 1/6] virtio_pci: minor MSI-X cleanups
..._try_to_find_vqs(struct vir struct virtqueue *vqs[], vq_callback_t *callbacks[], const char *names[], - int nvectors, + bool use_msix, bool per_vq_vectors) { struct virtio_pci_device *vp_dev = to_vp_device(vdev); - u16 vector; - int i, err, allocated_vectors; + u16 msix_vec; + int i, err, nvectors, allocated_vectors; - err = vp_request_vectors(vdev, nvectors, per_vq_vectors); - if (err) - goto error_request; + if (!use_msix) { + /* Old style: one normal interrupt for change and all vqs. */ + err = vp_request_intx(vdev); + if (err) + goto error_...
2018 Dec 28
0
[PATCH v1 1/2] virtio_pci: use queue idx instead of array idx to set up the vq
...ex 465a6f5..d0584c0 100644 --- a/drivers/virtio/virtio_pci_common.c +++ b/drivers/virtio/virtio_pci_common.c @@ -285,7 +285,7 @@ static int vp_find_vqs_msix(struct virtio_device *vdev, unsigned nvqs, { struct virtio_pci_device *vp_dev = to_vp_device(vdev); u16 msix_vec; - int i, err, nvectors, allocated_vectors; + int i, err, nvectors, allocated_vectors, queue_idx = 0; vp_dev->vqs = kcalloc(nvqs, sizeof(*vp_dev->vqs), GFP_KERNEL); if (!vp_dev->vqs) @@ -321,7 +321,7 @@ static int vp_find_vqs_msix(struct virtio_device *vdev, unsigned nvqs, msix_vec = allocated_vectors++; else msix_...
2012 Feb 01
0
[PATCH 1/2] virtio-pci: add setup_vqs flag in vp_try_to_find_vqs
...; + } > vp_del_vq(vq); > } > vp_dev->per_vq_vectors = false; > @@ -511,7 +513,10 @@ static int vp_try_to_find_vqs(struct virtio_device *vdev, unsigned nvqs, > { > struct virtio_pci_device *vp_dev = to_vp_device(vdev); > u16 msix_vec; > - int i, err, nvectors, allocated_vectors; > + int i, err, nvectors; > + > + if (vp_dev->msix_used_vectors) > + goto setup_vqs; > > if (!use_msix) { > /* Old style: one normal interrupt for change and all vqs. */ > @@ -536,12 +541,16 @@ static int vp_try_to_find_vqs(struct virtio_device *vdev, unsigned nv...
2012 Feb 01
0
[PATCH 1/2] virtio-pci: add setup_vqs flag in vp_try_to_find_vqs
...; + } > vp_del_vq(vq); > } > vp_dev->per_vq_vectors = false; > @@ -511,7 +513,10 @@ static int vp_try_to_find_vqs(struct virtio_device *vdev, unsigned nvqs, > { > struct virtio_pci_device *vp_dev = to_vp_device(vdev); > u16 msix_vec; > - int i, err, nvectors, allocated_vectors; > + int i, err, nvectors; > + > + if (vp_dev->msix_used_vectors) > + goto setup_vqs; > > if (!use_msix) { > /* Old style: one normal interrupt for change and all vqs. */ > @@ -536,12 +541,16 @@ static int vp_try_to_find_vqs(struct virtio_device *vdev, unsigned nv...
2009 Jul 26
1
[PATCHv4 2/2] virtio: refactor find_vqs
...har *names[], + int nvectors, + bool per_vq_vectors) { - int vectors = 0; - int i, err; - - /* How many vectors would we like? */ - for (i = 0; i < nvqs; ++i) - if (callbacks[i]) - ++vectors; + struct virtio_pci_device *vp_dev = to_vp_device(vdev); + u16 vector; + int i, err, allocated_vectors; - err = vp_request_vectors(vdev, vectors); + err = vp_request_vectors(vdev, nvectors, per_vq_vectors); if (err) goto error_request; + vp_dev->per_vq_vectors = per_vq_vectors; + allocated_vectors = vp_dev->msix_used_vectors; for (i = 0; i < nvqs; ++i) { - vqs[i] = vp_find_vq(vd...
2017 Feb 05
13
automatic IRQ affinity for virtio V3
Hi Michael, hi Jason, This patches applies a few cleanups to the virtio PCI interrupt 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
2017 Feb 05
13
automatic IRQ affinity for virtio V3
Hi Michael, hi Jason, This patches applies a few cleanups to the virtio PCI interrupt 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
2009 Jul 26
1
[PATCHv4 2/2] virtio: refactor find_vqs
...har *names[], + int nvectors, + bool per_vq_vectors) { - int vectors = 0; - int i, err; - - /* How many vectors would we like? */ - for (i = 0; i < nvqs; ++i) - if (callbacks[i]) - ++vectors; + struct virtio_pci_device *vp_dev = to_vp_device(vdev); + u16 vector; + int i, err, allocated_vectors; - err = vp_request_vectors(vdev, vectors); + err = vp_request_vectors(vdev, nvectors, per_vq_vectors); if (err) goto error_request; + vp_dev->per_vq_vectors = per_vq_vectors; + allocated_vectors = vp_dev->msix_used_vectors; for (i = 0; i < nvqs; ++i) { - vqs[i] = vp_find_vq(vd...
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.
2009 Jul 23
1
[PATCHv2 1/2] virtio: fix double free_irq on device removal
..._queue: @@ -503,8 +499,10 @@ static int vp_find_vqs(struct virtio_device *vdev, unsigned nvqs, vq_callback_t *callbacks[], const char *names[]) { + struct virtio_pci_device *vp_dev = to_vp_device(vdev); + u16 vector, per_vq_vector; int vectors = 0; - int i, err; + int i, err, allocated_vectors; /* How many vectors would we like? */ for (i = 0; i < nvqs; ++i) @@ -515,8 +513,18 @@ static int vp_find_vqs(struct virtio_device *vdev, unsigned nvqs, if (err) goto error_request; + allocated_vectors = vp_dev->msix_used_vectors; for (i = 0; i < nvqs; ++i) { - vqs[i] = vp_...
2009 Jul 23
1
[PATCHv2 1/2] virtio: fix double free_irq on device removal
..._queue: @@ -503,8 +499,10 @@ static int vp_find_vqs(struct virtio_device *vdev, unsigned nvqs, vq_callback_t *callbacks[], const char *names[]) { + struct virtio_pci_device *vp_dev = to_vp_device(vdev); + u16 vector, per_vq_vector; int vectors = 0; - int i, err; + int i, err, allocated_vectors; /* How many vectors would we like? */ for (i = 0; i < nvqs; ++i) @@ -515,8 +513,18 @@ static int vp_find_vqs(struct virtio_device *vdev, unsigned nvqs, if (err) goto error_request; + allocated_vectors = vp_dev->msix_used_vectors; for (i = 0; i < nvqs; ++i) { - vqs[i] = vp_...