search for: nvqs

Displaying 20 results from an estimated 940 matches for "nvqs".

2019 Dec 16
4
[PATCH] virtio-balloon: request nvqs based on features
...MSI-X vectors as required for the features it implements (e.g. 3 for the basic configuration of inflate + deflate + config), this results in the selection of the fallback configuration where one interrupt vector is used for all VQs instead of having one VQ per vector. Restore the logic that chose nvqs conditionally based on enabled features, which was removed as part of the aforementioned commit. This is slightly more complex than just incrementing a counter of the number of VQs, since the queue for a given feature is assigned a fixed index. Signed-off-by: Daniel Verkamp <dverkamp at chromiu...
2019 Dec 16
4
[PATCH] virtio-balloon: request nvqs based on features
...MSI-X vectors as required for the features it implements (e.g. 3 for the basic configuration of inflate + deflate + config), this results in the selection of the fallback configuration where one interrupt vector is used for all VQs instead of having one VQ per vector. Restore the logic that chose nvqs conditionally based on enabled features, which was removed as part of the aforementioned commit. This is slightly more complex than just incrementing a counter of the number of VQs, since the queue for a given feature is assigned a fixed index. Signed-off-by: Daniel Verkamp <dverkamp at chromiu...
2017 Mar 29
2
[PATCH 2/6] virtio: add context flag to find vqs
...u(config.num), MIC_VIRTIO_RING_ALIGN, dev, false, + ctx, (void __force *)va, vop_notify, callback, name); if (!vq) { err = -ENOMEM; @@ -374,7 +375,8 @@ static struct virtqueue *vop_find_vq(struct virtio_device *dev, static int vop_find_vqs(struct virtio_device *dev, unsigned nvqs, struct virtqueue *vqs[], vq_callback_t *callbacks[], - const char * const names[], struct irq_affinity *desc) + const char * const names[], const bool *ctx, + struct irq_affinity *desc) { struct _vop_vdev *vdev = to_vopvdev(dev); struct vop_device *vpdev = vdev->vpdev; @@ -38...
2017 Mar 29
2
[PATCH 2/6] virtio: add context flag to find vqs
...u(config.num), MIC_VIRTIO_RING_ALIGN, dev, false, + ctx, (void __force *)va, vop_notify, callback, name); if (!vq) { err = -ENOMEM; @@ -374,7 +375,8 @@ static struct virtqueue *vop_find_vq(struct virtio_device *dev, static int vop_find_vqs(struct virtio_device *dev, unsigned nvqs, struct virtqueue *vqs[], vq_callback_t *callbacks[], - const char * const names[], struct irq_affinity *desc) + const char * const names[], const bool *ctx, + struct irq_affinity *desc) { struct _vop_vdev *vdev = to_vopvdev(dev); struct vop_device *vpdev = vdev->vpdev; @@ -38...
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.
2014 Jan 25
3
[PATCH] virtio_balloon: don't call virtio_has_feature() twice on init_vqs()
...virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c @@ -320,19 +320,21 @@ static int init_vqs(struct virtio_balloon *vb) vq_callback_t *callbacks[] = { balloon_ack, balloon_ack, stats_request }; const char *names[] = { "inflate", "deflate", "stats" }; int err, nvqs; + bool stats; /* * We expect two virtqueues: inflate and deflate, and * optionally stat. */ - nvqs = virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_STATS_VQ) ? 3 : 2; + stats = virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_STATS_VQ); + nvqs = stats ? 3 : 2; err = vb->vdev-&g...
2014 Jan 25
3
[PATCH] virtio_balloon: don't call virtio_has_feature() twice on init_vqs()
...virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c @@ -320,19 +320,21 @@ static int init_vqs(struct virtio_balloon *vb) vq_callback_t *callbacks[] = { balloon_ack, balloon_ack, stats_request }; const char *names[] = { "inflate", "deflate", "stats" }; int err, nvqs; + bool stats; /* * We expect two virtqueues: inflate and deflate, and * optionally stat. */ - nvqs = virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_STATS_VQ) ? 3 : 2; + stats = virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_STATS_VQ); + nvqs = stats ? 3 : 2; err = vb->vdev-&g...
2017 Jan 27
0
[PATCH 4/9] virtio_pci: simplify MSI-X setup
...i_common.c b/drivers/virtio/virtio_pci_common.c index 9c4ad7d3f..74ff74c0 100644 --- a/drivers/virtio/virtio_pci_common.c +++ b/drivers/virtio/virtio_pci_common.c @@ -142,32 +142,39 @@ void vp_del_vqs(struct virtio_device *vdev) } static int vp_find_vqs_msix(struct virtio_device *vdev, unsigned nvqs, - struct virtqueue *vqs[], - vq_callback_t *callbacks[], - const char * const names[], - bool per_vq_vectors) + struct virtqueue *vqs[], vq_callback_t *callbacks[], + const char * const names[]) { struct virtio_pci_device *vp_dev = to_vp_device(vdev); const c...
2019 Dec 17
0
[PATCH] virtio-balloon: request nvqs based on features
...d for the features it implements (e.g. 3 for the > basic configuration of inflate + deflate + config), this results in the > selection of the fallback configuration where one interrupt vector is > used for all VQs instead of having one VQ per vector. > > Restore the logic that chose nvqs conditionally based on enabled > features, which was removed as part of the aforementioned commit. > This is slightly more complex than just incrementing a counter of the > number of VQs, since the queue for a given feature is assigned a fixed > index. As Wei already said, this should...
2019 Sep 26
6
[PATCH] vhost: introduce mdev based hardware backend
.../module.h> +#include <linux/vfio.h> +#include <linux/vhost.h> +#include <linux/virtio_mdev.h> + +#include "vhost.h" + +struct vhost_mdev { + /* The lock is to protect this structure. */ + struct mutex mutex; + struct vhost_dev dev; + struct vhost_virtqueue *vqs; + int nvqs; + u64 state; + u64 features; + u64 acked_features; + bool opened; + struct mdev_device *mdev; +}; + +static u8 mdev_get_status(struct mdev_device *mdev) +{ + const struct virtio_mdev_device_ops *ops = mdev_get_dev_ops(mdev); + + return ops->get_status(mdev); +} + +static void mdev_set_status(st...
2019 Sep 26
6
[PATCH] vhost: introduce mdev based hardware backend
.../module.h> +#include <linux/vfio.h> +#include <linux/vhost.h> +#include <linux/virtio_mdev.h> + +#include "vhost.h" + +struct vhost_mdev { + /* The lock is to protect this structure. */ + struct mutex mutex; + struct vhost_dev dev; + struct vhost_virtqueue *vqs; + int nvqs; + u64 state; + u64 features; + u64 acked_features; + bool opened; + struct mdev_device *mdev; +}; + +static u8 mdev_get_status(struct mdev_device *mdev) +{ + const struct virtio_mdev_device_ops *ops = mdev_get_dev_ops(mdev); + + return ops->get_status(mdev); +} + +static void mdev_set_status(st...
2018 Dec 28
0
[PATCH v1 2/2] virtio: don't allocate vqs when names[i] = NULL
...0 insertions(+), 9 deletions(-) diff --git a/drivers/misc/mic/vop/vop_main.c b/drivers/misc/mic/vop/vop_main.c index 6b212c8..2bfa3a9 100644 --- a/drivers/misc/mic/vop/vop_main.c +++ b/drivers/misc/mic/vop/vop_main.c @@ -394,16 +394,21 @@ static int vop_find_vqs(struct virtio_device *dev, unsigned nvqs, struct _vop_vdev *vdev = to_vopvdev(dev); struct vop_device *vpdev = vdev->vpdev; struct mic_device_ctrl __iomem *dc = vdev->dc; - int i, err, retry; + int i, err, retry, queue_idx = 0; /* We must have this many virtqueues. */ if (nvqs > ioread8(&vdev->desc->num_vq))...
2009 May 07
6
[PATCH 1/3] virtio: find_vqs/del_vqs virtio operations
...t/lguest_device.c index df44d96..53699aa 100644 --- a/drivers/lguest/lguest_device.c +++ b/drivers/lguest/lguest_device.c @@ -37,6 +37,10 @@ static inline void lguest_unmap(void *addr) struct lguest_device { struct virtio_device vdev; + /* Array of virtqueues */ + struct virtqueue **vqs; + int nvqs; + /* The entry in the lguest_devices page for this device. */ struct lguest_device_desc *desc; }; @@ -312,6 +316,47 @@ static void lg_del_vq(struct virtqueue *vq) kfree(lvq); } +static void lg_del_vqs(struct virtio_device *vdev) +{ + struct lguest_device *ldev = to_lgdev(vdev); + int i;...
2009 May 07
6
[PATCH 1/3] virtio: find_vqs/del_vqs virtio operations
...t/lguest_device.c index df44d96..53699aa 100644 --- a/drivers/lguest/lguest_device.c +++ b/drivers/lguest/lguest_device.c @@ -37,6 +37,10 @@ static inline void lguest_unmap(void *addr) struct lguest_device { struct virtio_device vdev; + /* Array of virtqueues */ + struct virtqueue **vqs; + int nvqs; + /* The entry in the lguest_devices page for this device. */ struct lguest_device_desc *desc; }; @@ -312,6 +316,47 @@ static void lg_del_vq(struct virtqueue *vq) kfree(lvq); } +static void lg_del_vqs(struct virtio_device *vdev) +{ + struct lguest_device *ldev = to_lgdev(vdev); + int i;...
2016 Nov 17
13
automatic IRQ affinity for virtio
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, and support for automatic affinity by the PCI layer if the consumers ask for it. It then converts over virtio_blk to use this functionality so that it's blk-mq queues are aligned to the MSI-X vector routing. I have a similar patch in the
2016 Nov 17
13
automatic IRQ affinity for virtio
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, and support for automatic affinity by the PCI layer if the consumers ask for it. It then converts over virtio_blk to use this functionality so that it's blk-mq queues are aligned to the MSI-X vector routing. I have a similar patch in the
2017 Aug 03
2
[PATCH v13 5/5] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ
...truct virtio_balloon *vb) > { > - struct virtqueue *vqs[3]; > - vq_callback_t *callbacks[] = { balloon_ack, balloon_ack, stats_request }; > - static const char * const names[] = { "inflate", "deflate", "stats" }; > - int err, nvqs; > + struct virtqueue **vqs; > + vq_callback_t **callbacks; > + const char **names; > + struct scatterlist sg; > + int i, nvqs, err = -ENOMEM; > + > + /* Inflateq and deflateq are used unconditionally */ > + nvqs = 2; > +...
2017 Aug 03
2
[PATCH v13 5/5] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ
...truct virtio_balloon *vb) > { > - struct virtqueue *vqs[3]; > - vq_callback_t *callbacks[] = { balloon_ack, balloon_ack, stats_request }; > - static const char * const names[] = { "inflate", "deflate", "stats" }; > - int err, nvqs; > + struct virtqueue **vqs; > + vq_callback_t **callbacks; > + const char **names; > + struct scatterlist sg; > + int i, nvqs, err = -ENOMEM; > + > + /* Inflateq and deflateq are used unconditionally */ > + nvqs = 2; > +...
2017 Jan 27
0
[PATCH 5/9] virtio: allow drivers to request IRQ affinity when creating VQs
...op/vop_main.c b/drivers/misc/mic/vop/vop_main.c index 1a2b67f3..c2e29d7 100644 --- a/drivers/misc/mic/vop/vop_main.c +++ b/drivers/misc/mic/vop/vop_main.c @@ -374,7 +374,7 @@ static struct virtqueue *vop_find_vq(struct virtio_device *dev, static int vop_find_vqs(struct virtio_device *dev, unsigned nvqs, struct virtqueue *vqs[], vq_callback_t *callbacks[], - const char * const names[]) + const char * const names[], struct irq_affinity *desc) { struct _vop_vdev *vdev = to_vopvdev(dev); struct vop_device *vpdev = vdev->vpdev; diff --git a/drivers/net/caif/caif_virtio.c b/drivers/...