search for: lg_find_vq

Displaying 20 results from an estimated 50 matches for "lg_find_vq".

2009 May 14
1
[PATCHv6 2/4] virtio: find_vqs/del_vqs virtio operations
...++ b/drivers/lguest/lguest_device.c @@ -313,6 +313,38 @@ static void lg_del_vq(struct virtqueue *vq) kfree(lvq); } +static void lg_del_vqs(struct virtio_device *vdev) +{ + struct virtqueue *vq, *n; + + list_for_each_entry_safe(vq, n, &vdev->vqs, list) + kvm_del_vq(vq); +} + +static int lg_find_vqs(struct virtio_device *vdev, unsigned nvqs, + struct virtqueue *vqs[] + vq_callback_t *callbacks[], + const char *names[]) +{ + struct lguest_device *ldev = to_lgdev(vdev); + int i; + + /* We must have this many virtqueues. */ + if (nvqs > ldev->desc->num_vq) + ret...
2009 May 14
1
[PATCHv6 2/4] virtio: find_vqs/del_vqs virtio operations
...++ b/drivers/lguest/lguest_device.c @@ -313,6 +313,38 @@ static void lg_del_vq(struct virtqueue *vq) kfree(lvq); } +static void lg_del_vqs(struct virtio_device *vdev) +{ + struct virtqueue *vq, *n; + + list_for_each_entry_safe(vq, n, &vdev->vqs, list) + kvm_del_vq(vq); +} + +static int lg_find_vqs(struct virtio_device *vdev, unsigned nvqs, + struct virtqueue *vqs[] + vq_callback_t *callbacks[], + const char *names[]) +{ + struct lguest_device *ldev = to_lgdev(vdev); + int i; + + /* We must have this many virtqueues. */ + if (nvqs > ldev->desc->num_vq) + ret...
2009 May 07
6
[PATCH 1/3] virtio: find_vqs/del_vqs virtio operations
...+static void lg_del_vqs(struct virtio_device *vdev) +{ + struct lguest_device *ldev = to_lgdev(vdev); + int i; + if (!ldev->vqs) + return; + for (i = 0; i < ldev->nvqs; ++i) + lg_del_vq(ldev->vqs[i]); + kfree(ldev->vqs); + ldev->vqs = NULL; + ldev->nvqs = 0; +} + +static int lg_find_vqs(struct virtio_device *vdev, unsigned nvqs, + struct virtqueue *vqs[] + void (*callbacks)[](struct virtqueue *)) +{ + struct lguest_device *ldev = to_lgdev(vdev); + int i; + + /* We must have this many virtqueues. */ + if (nvqs > ldev->desc->num_vq) + return ERR_PTR(-ENOEN...
2009 May 07
6
[PATCH 1/3] virtio: find_vqs/del_vqs virtio operations
...+static void lg_del_vqs(struct virtio_device *vdev) +{ + struct lguest_device *ldev = to_lgdev(vdev); + int i; + if (!ldev->vqs) + return; + for (i = 0; i < ldev->nvqs; ++i) + lg_del_vq(ldev->vqs[i]); + kfree(ldev->vqs); + ldev->vqs = NULL; + ldev->nvqs = 0; +} + +static int lg_find_vqs(struct virtio_device *vdev, unsigned nvqs, + struct virtqueue *vqs[] + void (*callbacks)[](struct virtqueue *)) +{ + struct lguest_device *ldev = to_lgdev(vdev); + int i; + + /* We must have this many virtqueues. */ + if (nvqs > ldev->desc->num_vq) + return ERR_PTR(-ENOEN...
2009 May 12
0
[PATCHv4] virtio: find_vqs/del_vqs virtio operations
...++ b/drivers/lguest/lguest_device.c @@ -313,6 +313,38 @@ static void lg_del_vq(struct virtqueue *vq) kfree(lvq); } +static void lg_del_vqs(struct virtio_device *vdev) +{ + struct virtqueue *vq, *n; + + list_for_each_entry_safe(vq, n, &vdev->vqs, list) + kvm_del_vq(vq); +} + +static int lg_find_vqs(struct virtio_device *vdev, unsigned nvqs, + struct virtqueue *vqs[] + void (*callbacks)[](struct virtqueue *), + const char *names[]) +{ + struct lguest_device *ldev = to_lgdev(vdev); + int i; + + /* We must have this many virtqueues. */ + if (nvqs > ldev->desc->n...
2009 May 12
0
[PATCHv4] virtio: find_vqs/del_vqs virtio operations
...++ b/drivers/lguest/lguest_device.c @@ -313,6 +313,38 @@ static void lg_del_vq(struct virtqueue *vq) kfree(lvq); } +static void lg_del_vqs(struct virtio_device *vdev) +{ + struct virtqueue *vq, *n; + + list_for_each_entry_safe(vq, n, &vdev->vqs, list) + kvm_del_vq(vq); +} + +static int lg_find_vqs(struct virtio_device *vdev, unsigned nvqs, + struct virtqueue *vqs[] + void (*callbacks)[](struct virtqueue *), + const char *names[]) +{ + struct lguest_device *ldev = to_lgdev(vdev); + int i; + + /* We must have this many virtqueues. */ + if (nvqs > ldev->desc->n...
2009 May 13
1
[PATCHv5 1/3] virtio: find_vqs/del_vqs virtio operations
...++ b/drivers/lguest/lguest_device.c @@ -313,6 +313,38 @@ static void lg_del_vq(struct virtqueue *vq) kfree(lvq); } +static void lg_del_vqs(struct virtio_device *vdev) +{ + struct virtqueue *vq, *n; + + list_for_each_entry_safe(vq, n, &vdev->vqs, list) + kvm_del_vq(vq); +} + +static int lg_find_vqs(struct virtio_device *vdev, unsigned nvqs, + struct virtqueue *vqs[] + vq_callback_t *callbacks[], + const char *names[]) +{ + struct lguest_device *ldev = to_lgdev(vdev); + int i; + + /* We must have this many virtqueues. */ + if (nvqs > ldev->desc->num_vq) + ret...
2009 May 13
1
[PATCHv5 1/3] virtio: find_vqs/del_vqs virtio operations
...++ b/drivers/lguest/lguest_device.c @@ -313,6 +313,38 @@ static void lg_del_vq(struct virtqueue *vq) kfree(lvq); } +static void lg_del_vqs(struct virtio_device *vdev) +{ + struct virtqueue *vq, *n; + + list_for_each_entry_safe(vq, n, &vdev->vqs, list) + kvm_del_vq(vq); +} + +static int lg_find_vqs(struct virtio_device *vdev, unsigned nvqs, + struct virtqueue *vqs[] + vq_callback_t *callbacks[], + const char *names[]) +{ + struct lguest_device *ldev = to_lgdev(vdev); + int i; + + /* We must have this many virtqueues. */ + if (nvqs > ldev->desc->num_vq) + ret...
2011 Mar 10
3
[PATCH 00/02] virtio: Virtio platform driver
virtio: Virtio platform driver [PATCH 01/02] virtio: Break out lguest virtio code to virtio_lguest.c [PATCH 02/02] virtio: Add virtio platform driver These patches add a virtio platform driver to the Linux kernel. This platform driver has the same role as the virtio_pci driver, but instead of building on top of emulated PCI this driver is making use of the platform bus together with driver
2011 Mar 10
3
[PATCH 00/02] virtio: Virtio platform driver
virtio: Virtio platform driver [PATCH 01/02] virtio: Break out lguest virtio code to virtio_lguest.c [PATCH 02/02] virtio: Add virtio platform driver These patches add a virtio platform driver to the Linux kernel. This platform driver has the same role as the virtio_pci driver, but instead of building on top of emulated PCI this driver is making use of the platform bus together with driver
2009 May 14
0
[PATCHv6 1/4] virtio: add names to virtqueue struct, mapping from devices to queues.
..._in_vq; diff --git a/drivers/lguest/lguest_device.c b/drivers/lguest/lguest_device.c index df44d96..4babed8 100644 --- a/drivers/lguest/lguest_device.c +++ b/drivers/lguest/lguest_device.c @@ -228,7 +228,8 @@ extern void lguest_setup_irq(unsigned int irq); * function. */ static struct virtqueue *lg_find_vq(struct virtio_device *vdev, unsigned index, - void (*callback)(struct virtqueue *vq)) + void (*callback)(struct virtqueue *vq), + const char *name) { struct lguest_device *ldev = to_lgdev(vdev); struct lguest_vq_info *lvq; @@ -263,7 +264,7 @@ static struct virtque...
2009 May 14
0
[PATCHv6 1/4] virtio: add names to virtqueue struct, mapping from devices to queues.
..._in_vq; diff --git a/drivers/lguest/lguest_device.c b/drivers/lguest/lguest_device.c index df44d96..4babed8 100644 --- a/drivers/lguest/lguest_device.c +++ b/drivers/lguest/lguest_device.c @@ -228,7 +228,8 @@ extern void lguest_setup_irq(unsigned int irq); * function. */ static struct virtqueue *lg_find_vq(struct virtio_device *vdev, unsigned index, - void (*callback)(struct virtqueue *vq)) + void (*callback)(struct virtqueue *vq), + const char *name) { struct lguest_device *ldev = to_lgdev(vdev); struct lguest_vq_info *lvq; @@ -263,7 +264,7 @@ static struct virtque...
2011 Jun 21
6
[PATCH 00/02][RESEND] virtio: Virtio platform driver
virtio: Virtio platform driver [PATCH 01/02] virtio: Break out lguest virtio code to virtio_lguest.c [PATCH 02/02] virtio: Add virtio platform driver These patches add a virtio platform driver to the Linux kernel. This platform driver has the same role as the virtio_pci driver, but instead of building on top of emulated PCI this driver is making use of the platform bus together with driver
2011 Jun 21
6
[PATCH 00/02][RESEND] virtio: Virtio platform driver
virtio: Virtio platform driver [PATCH 01/02] virtio: Break out lguest virtio code to virtio_lguest.c [PATCH 02/02] virtio: Add virtio platform driver These patches add a virtio platform driver to the Linux kernel. This platform driver has the same role as the virtio_pci driver, but instead of building on top of emulated PCI this driver is making use of the platform bus together with driver
2007 Nov 14
1
[PATCH] Remove pagesize parameter from vring_init/vring_size
...ice's descriptor. */ add_desc_field(dev, VIRTIO_CONFIG_F_VIRTQUEUE, diff --git a/drivers/lguest/lguest_device.c b/drivers/lguest/lguest_device.c index e2eec38..cbf90fc 100644 --- a/drivers/lguest/lguest_device.c +++ b/drivers/lguest/lguest_device.c @@ -200,8 +200,7 @@ static struct virtqueue *lg_find_vq(struct virtio_device *vdev, /* Figure out how many pages the ring will take, and map that memory */ lvq->pages = lguest_map((unsigned long)lvq->config.pfn << PAGE_SHIFT, - DIV_ROUND_UP(vring_size(lvq->config.num, - PAGE_SIZE), + DIV_ROUND_UP(vring_size(lvq->confi...
2007 Nov 14
1
[PATCH] Remove pagesize parameter from vring_init/vring_size
...ice's descriptor. */ add_desc_field(dev, VIRTIO_CONFIG_F_VIRTQUEUE, diff --git a/drivers/lguest/lguest_device.c b/drivers/lguest/lguest_device.c index e2eec38..cbf90fc 100644 --- a/drivers/lguest/lguest_device.c +++ b/drivers/lguest/lguest_device.c @@ -200,8 +200,7 @@ static struct virtqueue *lg_find_vq(struct virtio_device *vdev, /* Figure out how many pages the ring will take, and map that memory */ lvq->pages = lguest_map((unsigned long)lvq->config.pfn << PAGE_SHIFT, - DIV_ROUND_UP(vring_size(lvq->config.num, - PAGE_SIZE), + DIV_ROUND_UP(vring_size(lvq->confi...
2012 Sep 05
1
[PATCH] virtio: support reserved vqs
...nfig.h | 2 ++ 6 files changed, 18 insertions(+), 1 deletion(-) diff --git a/drivers/lguest/lguest_device.c b/drivers/lguest/lguest_device.c index 9e8388e..e849e12 100644 --- a/drivers/lguest/lguest_device.c +++ b/drivers/lguest/lguest_device.c @@ -263,6 +263,9 @@ static struct virtqueue *lg_find_vq(struct virtio_device *vdev, struct virtqueue *vq; int err; + if (!name) + return NULL; + /* We must have this many virtqueues. */ if (index >= ldev->desc->num_vq) return ERR_PTR(-ENOENT); diff --git a/drivers/remoteproc/remoteproc_virtio.c b/drivers/remoteproc/remoteproc_virt...
2012 Sep 05
1
[PATCH] virtio: support reserved vqs
...nfig.h | 2 ++ 6 files changed, 18 insertions(+), 1 deletion(-) diff --git a/drivers/lguest/lguest_device.c b/drivers/lguest/lguest_device.c index 9e8388e..e849e12 100644 --- a/drivers/lguest/lguest_device.c +++ b/drivers/lguest/lguest_device.c @@ -263,6 +263,9 @@ static struct virtqueue *lg_find_vq(struct virtio_device *vdev, struct virtqueue *vq; int err; + if (!name) + return NULL; + /* We must have this many virtqueues. */ if (index >= ldev->desc->num_vq) return ERR_PTR(-ENOENT); diff --git a/drivers/remoteproc/remoteproc_virtio.c b/drivers/remoteproc/remoteproc_virt...
2011 Nov 15
1
[RFC PATCH net-next v2] enable virtio_net to return bus_info in ethtool -i consistent with emulated NICs
...vice *vdev) +{ + return ""; +} + /* The ops structure which hooks everything together. */ static struct virtio_config_ops lguest_config_ops = { .get_features = lg_get_features, @@ -392,6 +397,7 @@ static struct virtio_config_ops lguest_config_ops = { .reset = lg_reset, .find_vqs = lg_find_vqs, .del_vqs = lg_del_vqs, + .bus_name = lg_bus_name, }; /* diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 6ee8410..4dc9d84 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -39,6 +39,7 @@ module_param(gso, bool, 0444); #define GOOD_COPY_LEN 128...
2011 Nov 15
1
[RFC PATCH net-next v2] enable virtio_net to return bus_info in ethtool -i consistent with emulated NICs
...vice *vdev) +{ + return ""; +} + /* The ops structure which hooks everything together. */ static struct virtio_config_ops lguest_config_ops = { .get_features = lg_get_features, @@ -392,6 +397,7 @@ static struct virtio_config_ops lguest_config_ops = { .reset = lg_reset, .find_vqs = lg_find_vqs, .del_vqs = lg_del_vqs, + .bus_name = lg_bus_name, }; /* diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 6ee8410..4dc9d84 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -39,6 +39,7 @@ module_param(gso, bool, 0444); #define GOOD_COPY_LEN 128...