Displaying 20 results from an estimated 114 matches for "vp_find_vq".
Did you mean:
vp_find_vqs
2009 Jul 23
1
[PATCHv2 1/2] virtio: fix double free_irq on device removal
...struct virtio_pci_device
char (*msix_names)[256];
/* Number of available vectors */
unsigned msix_vectors;
- /* Vectors allocated */
+ /* Vectors allocated, excluding per-vq vectors if any */
unsigned msix_used_vectors;
};
@@ -364,13 +364,15 @@ error_entries:
static struct virtqueue *vp_find_vq(struct virtio_device *vdev, unsigned index,
void (*callback)(struct virtqueue *vq),
- const char *name)
+ const char *name,
+ u16 vector,
+ u16 per_vq_vector)
{
struct virtio_pci_device *vp_dev = to_vp_device(vdev);
struct virtio_pci_vq_info *info;
struct...
2009 Jul 23
1
[PATCHv2 1/2] virtio: fix double free_irq on device removal
...struct virtio_pci_device
char (*msix_names)[256];
/* Number of available vectors */
unsigned msix_vectors;
- /* Vectors allocated */
+ /* Vectors allocated, excluding per-vq vectors if any */
unsigned msix_used_vectors;
};
@@ -364,13 +364,15 @@ error_entries:
static struct virtqueue *vp_find_vq(struct virtio_device *vdev, unsigned index,
void (*callback)(struct virtqueue *vq),
- const char *name)
+ const char *name,
+ u16 vector,
+ u16 per_vq_vector)
{
struct virtio_pci_device *vp_dev = to_vp_device(vdev);
struct virtio_pci_vq_info *info;
struct...
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,
go...
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,
go...
2009 Jul 26
1
[PATCHv4 2/2] virtio: refactor find_vqs
...vp_dev->msix_vectors && vp_dev->msix_vectors != max_vqs + 1) {
+ if (!per_vq_vectors) {
/* Shared vector for all VQs */
v = vp_dev->msix_used_vectors;
snprintf(vp_dev->msix_names[v], sizeof *vp_dev->msix_names,
@@ -366,13 +358,14 @@ error:
static struct virtqueue *vp_find_vq(struct virtio_device *vdev, unsigned index,
void (*callback)(struct virtqueue *vq),
- const char *name)
+ const char *name,
+ u16 vector)
{
struct virtio_pci_device *vp_dev = to_vp_device(vdev);
struct virtio_pci_vq_info *info;
struct virtqueue *vq;
unsigned l...
2009 Jul 26
1
[PATCHv4 2/2] virtio: refactor find_vqs
...vp_dev->msix_vectors && vp_dev->msix_vectors != max_vqs + 1) {
+ if (!per_vq_vectors) {
/* Shared vector for all VQs */
v = vp_dev->msix_used_vectors;
snprintf(vp_dev->msix_names[v], sizeof *vp_dev->msix_names,
@@ -366,13 +358,14 @@ error:
static struct virtqueue *vp_find_vq(struct virtio_device *vdev, unsigned index,
void (*callback)(struct virtqueue *vq),
- const char *name)
+ const char *name,
+ u16 vector)
{
struct virtio_pci_device *vp_dev = to_vp_device(vdev);
struct virtio_pci_vq_info *info;
struct virtqueue *vq;
unsigned l...
2009 Jul 26
0
[PATCHv3 2/2] virtio: refactor find_vqs
...vp_dev->msix_vectors && vp_dev->msix_vectors != max_vqs + 1) {
+ if (!per_vq_vectors) {
/* Shared vector for all VQs */
v = vp_dev->msix_used_vectors;
snprintf(vp_dev->msix_names[v], sizeof *vp_dev->msix_names,
@@ -366,13 +358,14 @@ error:
static struct virtqueue *vp_find_vq(struct virtio_device *vdev, unsigned index,
void (*callback)(struct virtqueue *vq),
- const char *name)
+ const char *name,
+ u16 vector)
{
struct virtio_pci_device *vp_dev = to_vp_device(vdev);
struct virtio_pci_vq_info *info;
struct virtqueue *vq;
unsigned l...
2009 Jul 26
0
[PATCHv3 2/2] virtio: refactor find_vqs
...vp_dev->msix_vectors && vp_dev->msix_vectors != max_vqs + 1) {
+ if (!per_vq_vectors) {
/* Shared vector for all VQs */
v = vp_dev->msix_used_vectors;
snprintf(vp_dev->msix_names[v], sizeof *vp_dev->msix_names,
@@ -366,13 +358,14 @@ error:
static struct virtqueue *vp_find_vq(struct virtio_device *vdev, unsigned index,
void (*callback)(struct virtqueue *vq),
- const char *name)
+ const char *name,
+ u16 vector)
{
struct virtio_pci_device *vp_dev = to_vp_device(vdev);
struct virtio_pci_vq_info *info;
struct virtqueue *vq;
unsigned l...
2009 May 07
1
[PATCH 3/3] virtio_pci: optional MSI-X support
...IG_VECTOR,
+ vp_dev->ioaddr + VIRTIO_MSI_CONFIG_VECTOR);
+ return 0;
+error_irq:
+ vp_free_vectors(vdev);
+ kfree(vp_dev->msix_names);
+error_names:
+ kfree(vp_dev->msix_entries);
+error_entries:
+ return err;
}
-/* the config->find_vq() implementation */
static struct virtqueue *vp_find_vq(struct virtio_device *vdev, unsigned index,
void (*callback)(struct virtqueue *vq))
{
@@ -239,7 +359,7 @@ static struct virtqueue *vp_find_vq(struct virtio_device *vdev, unsigned index,
struct virtio_pci_vq_info *info;
struct virtqueue *vq;
unsigned long flags, size;
- u16 num;
+ u1...
2009 May 07
1
[PATCH 3/3] virtio_pci: optional MSI-X support
...IG_VECTOR,
+ vp_dev->ioaddr + VIRTIO_MSI_CONFIG_VECTOR);
+ return 0;
+error_irq:
+ vp_free_vectors(vdev);
+ kfree(vp_dev->msix_names);
+error_names:
+ kfree(vp_dev->msix_entries);
+error_entries:
+ return err;
}
-/* the config->find_vq() implementation */
static struct virtqueue *vp_find_vq(struct virtio_device *vdev, unsigned index,
void (*callback)(struct virtqueue *vq))
{
@@ -239,7 +359,7 @@ static struct virtqueue *vp_find_vq(struct virtio_device *vdev, unsigned index,
struct virtio_pci_vq_info *info;
struct virtqueue *vq;
unsigned long flags, size;
- u16 num;
+ u1...
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.com.au>
Cc: "Michael S. Tsirkin" <mst at redhat.com>
---
drivers/virtio/virtio_pci.c |...
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.com.au>
Cc: "Michael S. Tsirkin" <mst at redhat.com>
---
drivers/virtio/virtio_pci.c |...
2009 May 13
1
[PATCHv5 3/3] virtio_pci: optional MSI-X support
...dev->msix_names[v],
+ vp_dev);
+ if (err)
+ goto error_irq;
+ ++vp_dev->msix_used_vectors;
+ }
+ return 0;
+error_irq:
+ vp_free_vectors(vdev);
+ kfree(vp_dev->msix_names);
+error_names:
+ kfree(vp_dev->msix_entries);
+error_entries:
+ return err;
+}
+
static struct virtqueue *vp_find_vq(struct virtio_device *vdev, unsigned index,
void (*callback)(struct virtqueue *vq),
const char *name)
@@ -230,7 +369,7 @@ static struct virtqueue *vp_find_vq(struct virtio_device *vdev, unsigned index,
struct virtio_pci_vq_info *info;
struct virtqueue *vq;
unsigned long flag...
2009 May 13
1
[PATCHv5 3/3] virtio_pci: optional MSI-X support
...dev->msix_names[v],
+ vp_dev);
+ if (err)
+ goto error_irq;
+ ++vp_dev->msix_used_vectors;
+ }
+ return 0;
+error_irq:
+ vp_free_vectors(vdev);
+ kfree(vp_dev->msix_names);
+error_names:
+ kfree(vp_dev->msix_entries);
+error_entries:
+ return err;
+}
+
static struct virtqueue *vp_find_vq(struct virtio_device *vdev, unsigned index,
void (*callback)(struct virtqueue *vq),
const char *name)
@@ -230,7 +369,7 @@ static struct virtqueue *vp_find_vq(struct virtio_device *vdev, unsigned index,
struct virtio_pci_vq_info *info;
struct virtqueue *vq;
unsigned long flag...
2009 May 14
1
[PATCHv6 4/4] virtio_pci: optional MSI-X support
...dev->msix_names[v],
+ vp_dev);
+ if (err)
+ goto error_irq;
+ ++vp_dev->msix_used_vectors;
+ }
+ return 0;
+error_irq:
+ vp_free_vectors(vdev);
+ kfree(vp_dev->msix_names);
+error_names:
+ kfree(vp_dev->msix_entries);
+error_entries:
+ return err;
+}
+
static struct virtqueue *vp_find_vq(struct virtio_device *vdev, unsigned index,
void (*callback)(struct virtqueue *vq),
const char *name)
@@ -230,7 +369,7 @@ static struct virtqueue *vp_find_vq(struct virtio_device *vdev, unsigned index,
struct virtio_pci_vq_info *info;
struct virtqueue *vq;
unsigned long flag...
2009 May 14
1
[PATCHv6 4/4] virtio_pci: optional MSI-X support
...dev->msix_names[v],
+ vp_dev);
+ if (err)
+ goto error_irq;
+ ++vp_dev->msix_used_vectors;
+ }
+ return 0;
+error_irq:
+ vp_free_vectors(vdev);
+ kfree(vp_dev->msix_names);
+error_names:
+ kfree(vp_dev->msix_entries);
+error_entries:
+ return err;
+}
+
static struct virtqueue *vp_find_vq(struct virtio_device *vdev, unsigned index,
void (*callback)(struct virtqueue *vq),
const char *name)
@@ -230,7 +369,7 @@ static struct virtqueue *vp_find_vq(struct virtio_device *vdev, unsigned index,
struct virtio_pci_vq_info *info;
struct virtqueue *vq;
unsigned long flag...
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
[<ffffffff81445...
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
[<ffffffff81445...