search for: vp_find_vqs

Displaying 20 results from an estimated 114 matches for "vp_find_vqs".

2009 Jul 23
1
[PATCHv2 1/2] virtio: fix double free_irq on device removal
...- if (info->vector != VIRTIO_MSI_NO_VECTOR) { + if (info->vector != VIRTIO_MSI_NO_VECTOR) free_irq(vp_dev->msix_entries[info->vector].vector, vq); - --vp_dev->msix_used_vectors; - } out_request_irq: vring_del_virtqueue(vq); out_activate_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...
2009 Jul 23
1
[PATCHv2 1/2] virtio: fix double free_irq on device removal
...- if (info->vector != VIRTIO_MSI_NO_VECTOR) { + if (info->vector != VIRTIO_MSI_NO_VECTOR) free_irq(vp_dev->msix_entries[info->vector].vector, vq); - --vp_dev->msix_used_vectors; - } out_request_irq: vring_del_virtqueue(vq); out_activate_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...
2009 Jun 01
2
find_vqs operation starting at arbitrary index
...ff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index 193c8f0..cb3f8df 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -499,7 +499,7 @@ static void vp_del_vqs(struct virtio_device *vdev) /* the config->find_vqs() implementation */ static int vp_find_vqs(struct virtio_device *vdev, unsigned nvqs, - struct virtqueue *vqs[], + unsigned start_index, struct virtqueue *vqs[], vq_callback_t *callbacks[], const char *names[]) { @@ -516,7 +516,8 @@ static int vp_find_vqs(struct virtio_device *vdev, unsigned nvqs, got...
2009 Jun 01
2
find_vqs operation starting at arbitrary index
...ff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index 193c8f0..cb3f8df 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -499,7 +499,7 @@ static void vp_del_vqs(struct virtio_device *vdev) /* the config->find_vqs() implementation */ static int vp_find_vqs(struct virtio_device *vdev, unsigned nvqs, - struct virtqueue *vqs[], + unsigned start_index, struct virtqueue *vqs[], vq_callback_t *callbacks[], const char *names[]) { @@ -516,7 +516,8 @@ static int vp_find_vqs(struct virtio_device *vdev, unsigned nvqs, got...
2009 Jul 26
1
[PATCHv4 2/2] virtio: refactor find_vqs
...mp;vdev->vqs, list) { + info = vq->priv; + if (vp_dev->per_vq_vectors) + free_irq(vp_dev->msix_entries[info->vector].vector, vq); vp_del_vq(vq); + } + vp_dev->per_vq_vectors = false; vp_free_vectors(vdev); } -/* the config->find_vqs() implementation */ -static int vp_find_vqs(struct virtio_device *vdev, unsigned nvqs, - struct virtqueue *vqs[], - vq_callback_t *callbacks[], - const char *names[]) +static int vp_try_to_find_vqs(struct virtio_device *vdev, unsigned nvqs, + struct virtqueue *vqs[], + vq_callback_t *callbacks[], +...
2009 Jul 26
1
[PATCHv4 2/2] virtio: refactor find_vqs
...mp;vdev->vqs, list) { + info = vq->priv; + if (vp_dev->per_vq_vectors) + free_irq(vp_dev->msix_entries[info->vector].vector, vq); vp_del_vq(vq); + } + vp_dev->per_vq_vectors = false; vp_free_vectors(vdev); } -/* the config->find_vqs() implementation */ -static int vp_find_vqs(struct virtio_device *vdev, unsigned nvqs, - struct virtqueue *vqs[], - vq_callback_t *callbacks[], - const char *names[]) +static int vp_try_to_find_vqs(struct virtio_device *vdev, unsigned nvqs, + struct virtqueue *vqs[], + vq_callback_t *callbacks[], +...
2009 Jul 26
0
[PATCHv3 2/2] virtio: refactor find_vqs
...mp;vdev->vqs, list) { + info = vq->priv; + if (vp_dev->per_vq_vectors) + free_irq(vp_dev->msix_entries[info->vector].vector, vq); vp_del_vq(vq); + } + vp_dev->per_vq_vectors = false; vp_free_vectors(vdev); } -/* the config->find_vqs() implementation */ -static int vp_find_vqs(struct virtio_device *vdev, unsigned nvqs, - struct virtqueue *vqs[], - vq_callback_t *callbacks[], - const char *names[]) +static int vp_try_to_find_vqs(struct virtio_device *vdev, unsigned nvqs, + struct virtqueue *vqs[], + vq_callback_t *callbacks[], +...
2009 Jul 26
0
[PATCHv3 2/2] virtio: refactor find_vqs
...mp;vdev->vqs, list) { + info = vq->priv; + if (vp_dev->per_vq_vectors) + free_irq(vp_dev->msix_entries[info->vector].vector, vq); vp_del_vq(vq); + } + vp_dev->per_vq_vectors = false; vp_free_vectors(vdev); } -/* the config->find_vqs() implementation */ -static int vp_find_vqs(struct virtio_device *vdev, unsigned nvqs, - struct virtqueue *vqs[], - vq_callback_t *callbacks[], - const char *names[]) +static int vp_try_to_find_vqs(struct virtio_device *vdev, unsigned nvqs, + struct virtqueue *vqs[], + vq_callback_t *callbacks[], +...
2009 May 07
1
[PATCH 3/3] virtio_pci: optional MSI-X support
...struct virtio_pci_device *vp_dev = to_vp_device(vdev); @@ -326,23 +476,38 @@ static void vp_del_vqs(struct virtio_device *vdev) list_for_each_entry(info, &virtqueues, node) vp_del_vq(info->vq); + + vp_free_vectors(vdev); } +/* the config->find_vqs() implementation */ static int vp_find_vqs(struct virtio_device *vdev, unsigned nvqs, - struct virtqueue *vqs[] - void (*callbacks)[](struct virtqueue *)) + struct virtqueue *vqs[], + virtqueue_callback *callbacks[]) { - int i; + int vectors = 0; + int i, err; + + /* How many vectors would we like? */ + for...
2009 May 07
1
[PATCH 3/3] virtio_pci: optional MSI-X support
...struct virtio_pci_device *vp_dev = to_vp_device(vdev); @@ -326,23 +476,38 @@ static void vp_del_vqs(struct virtio_device *vdev) list_for_each_entry(info, &virtqueues, node) vp_del_vq(info->vq); + + vp_free_vectors(vdev); } +/* the config->find_vqs() implementation */ static int vp_find_vqs(struct virtio_device *vdev, unsigned nvqs, - struct virtqueue *vqs[] - void (*callbacks)[](struct virtqueue *)) + struct virtqueue *vqs[], + virtqueue_callback *callbacks[]) { - int i; + int vectors = 0; + int i, err; + + /* How many vectors would we like? */ + for...
2009 Sep 21
0
[PATCH 1/6] virtio_pci: minor MSI-X cleanups
...v->msix_names, + "%s-%s", + dev_name(&vp_dev->vdev.dev), names[i]); + err = request_irq(msix_vec, vring_interrupt, 0, + vp_dev->msix_names[msix_vec], + vqs[i]); if (err) { vp_del_vq(vqs[i]); goto error_find; @@ -537,28 +560,20 @@ static int vp_find_vqs(struct virtio_dev vq_callback_t *callbacks[], const char *names[]) { - int vectors = 0; - int i, uninitialized_var(err); + int err; - /* How many vectors would we like? */ - for (i = 0; i < nvqs; ++i) - if (callbacks[i]) - ++vectors; - - /* We want at most one vector pe...
2009 Sep 21
0
[PATCH 1/6] virtio_pci: minor MSI-X cleanups
...v->msix_names, + "%s-%s", + dev_name(&vp_dev->vdev.dev), names[i]); + err = request_irq(msix_vec, vring_interrupt, 0, + vp_dev->msix_names[msix_vec], + vqs[i]); if (err) { vp_del_vq(vqs[i]); goto error_find; @@ -537,28 +560,20 @@ static int vp_find_vqs(struct virtio_dev vq_callback_t *callbacks[], const char *names[]) { - int vectors = 0; - int i, uninitialized_var(err); + int err; - /* How many vectors would we like? */ - for (i = 0; i < nvqs; ++i) - if (callbacks[i]) - ++vectors; - - /* We want at most one vector pe...
2009 May 13
1
[PATCHv5 3/3] virtio_pci: optional MSI-X support
.../* the config->del_vqs() implementation */ static void vp_del_vqs(struct virtio_device *vdev) { struct virtqueue *vq, *n; list_for_each_entry_safe(vq, n, &vdev->vqs, list) vp_del_vq(vq); + + vp_free_vectors(vdev); } +/* the config->find_vqs() implementation */ static int vp_find_vqs(struct virtio_device *vdev, unsigned nvqs, struct virtqueue *vqs[], vq_callback_t *callbacks[], const char *names[]) { - int i; + int vectors = 0; + int i, err; + + /* How many vectors would we like? */ + for (i = 0; i < nvqs; ++i) + if (callbacks[i]) + ++vector...
2009 May 13
1
[PATCHv5 3/3] virtio_pci: optional MSI-X support
.../* the config->del_vqs() implementation */ static void vp_del_vqs(struct virtio_device *vdev) { struct virtqueue *vq, *n; list_for_each_entry_safe(vq, n, &vdev->vqs, list) vp_del_vq(vq); + + vp_free_vectors(vdev); } +/* the config->find_vqs() implementation */ static int vp_find_vqs(struct virtio_device *vdev, unsigned nvqs, struct virtqueue *vqs[], vq_callback_t *callbacks[], const char *names[]) { - int i; + int vectors = 0; + int i, err; + + /* How many vectors would we like? */ + for (i = 0; i < nvqs; ++i) + if (callbacks[i]) + ++vector...
2009 May 14
1
[PATCHv6 4/4] virtio_pci: optional MSI-X support
.../* the config->del_vqs() implementation */ static void vp_del_vqs(struct virtio_device *vdev) { struct virtqueue *vq, *n; list_for_each_entry_safe(vq, n, &vdev->vqs, list) vp_del_vq(vq); + + vp_free_vectors(vdev); } +/* the config->find_vqs() implementation */ static int vp_find_vqs(struct virtio_device *vdev, unsigned nvqs, struct virtqueue *vqs[], vq_callback_t *callbacks[], const char *names[]) { - int i; + int vectors = 0; + int i, err; + + /* How many vectors would we like? */ + for (i = 0; i < nvqs; ++i) + if (callbacks[i]) + ++vector...
2009 May 14
1
[PATCHv6 4/4] virtio_pci: optional MSI-X support
.../* the config->del_vqs() implementation */ static void vp_del_vqs(struct virtio_device *vdev) { struct virtqueue *vq, *n; list_for_each_entry_safe(vq, n, &vdev->vqs, list) vp_del_vq(vq); + + vp_free_vectors(vdev); } +/* the config->find_vqs() implementation */ static int vp_find_vqs(struct virtio_device *vdev, unsigned nvqs, struct virtqueue *vqs[], vq_callback_t *callbacks[], const char *names[]) { - int i; + int vectors = 0; + int i, err; + + /* How many vectors would we like? */ + for (i = 0; i < nvqs; ++i) + if (callbacks[i]) + ++vector...
2017 Mar 07
0
panic in virtio console startup in v4.11-rc1
...ffc00000(0000) knlGS:0000000000000000 [ 2.412007] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 2.412007] CR2: ffff97a3ec5f4000 CR3: 000000012d91e000 CR4: 00000000000406f0 [ 2.412007] Call Trace: [ 2.412007] vsnprintf+0x2d7/0x500 [ 2.412007] snprintf+0x49/0x60 [ 2.412007] vp_find_vqs+0x206/0x4e0 [virtio_pci] [ 2.412007] init_vqs+0x18b/0x2f0 [virtio_console] [ 2.412007] virtcons_probe+0xc6/0x350 [virtio_console] [ 2.412007] virtio_dev_probe+0x144/0x1e0 [virtio] [ 2.412007] driver_probe_device+0x2bb/0x460 [ 2.412007] __driver_attach+0xdf/0xf0 [ 2.412007] ?...
2017 Mar 07
0
panic in virtio console startup in v4.11-rc1
...ffc00000(0000) knlGS:0000000000000000 [ 2.412007] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 2.412007] CR2: ffff97a3ec5f4000 CR3: 000000012d91e000 CR4: 00000000000406f0 [ 2.412007] Call Trace: [ 2.412007] vsnprintf+0x2d7/0x500 [ 2.412007] snprintf+0x49/0x60 [ 2.412007] vp_find_vqs+0x206/0x4e0 [virtio_pci] [ 2.412007] init_vqs+0x18b/0x2f0 [virtio_console] [ 2.412007] virtcons_probe+0xc6/0x350 [virtio_console] [ 2.412007] virtio_dev_probe+0x144/0x1e0 [virtio] [ 2.412007] driver_probe_device+0x2bb/0x460 [ 2.412007] __driver_attach+0xdf/0xf0 [ 2.412007] ?...
2013 Jun 20
3
[PATCH] virtio-pci: fix leaks of msix_affinity_masks
...loc+0x5e/0xc0 [<ffffffff811aa7f1>] kmem_cache_alloc_node_trace+0x141/0x2c0 [<ffffffff8133ba23>] alloc_cpumask_var_node+0x23/0x80 [<ffffffff8133ba8e>] alloc_cpumask_var+0xe/0x10 [<ffffffff813fdb3d>] vp_try_to_find_vqs+0x25d/0x810 [<ffffffff813fe171>] vp_find_vqs+0x81/0xb0 [<ffffffffa00d2a05>] init_vqs+0x85/0x120 [virtio_balloon] [<ffffffffa00d2c29>] virtballoon_probe+0xf9/0x1a0 [virtio_balloon] [<ffffffff813fb61e>] virtio_dev_probe+0xde/0x140 [<ffffffff814452b8>] driver_probe_device+0x98/0x3a0 [<ffffffff814456...
2013 Jun 20
3
[PATCH] virtio-pci: fix leaks of msix_affinity_masks
...loc+0x5e/0xc0 [<ffffffff811aa7f1>] kmem_cache_alloc_node_trace+0x141/0x2c0 [<ffffffff8133ba23>] alloc_cpumask_var_node+0x23/0x80 [<ffffffff8133ba8e>] alloc_cpumask_var+0xe/0x10 [<ffffffff813fdb3d>] vp_try_to_find_vqs+0x25d/0x810 [<ffffffff813fe171>] vp_find_vqs+0x81/0xb0 [<ffffffffa00d2a05>] init_vqs+0x85/0x120 [virtio_balloon] [<ffffffffa00d2c29>] virtballoon_probe+0xf9/0x1a0 [virtio_balloon] [<ffffffff813fb61e>] virtio_dev_probe+0xde/0x140 [<ffffffff814452b8>] driver_probe_device+0x98/0x3a0 [<ffffffff814456...