search for: set_vq_affin

Displaying 20 results from an estimated 94 matches for "set_vq_affin".

2023 May 04
2
[PATCH] virtio-vdpa: Fix unchecked call to NULL set_vq_affinity
On 2023-05-04 a.m.9:50, Dragos Tatulea wrote: > External email: Use caution opening links or attachments > > > The referenced patch calls set_vq_affinity without checking if the op is > valid. This patch adds the check. > > Fixes: 3dad56823b53 ("virtio-vdpa: Support interrupt affinity spreading mechanism") > Reviewed-by: Gal Pressman <gal at nvidia.com> > Signed-off-by: Dragos Tatulea <dtatulea at nvidia.com>...
2023 May 04
2
[PATCH] virtio-vdpa: Fix unchecked call to NULL set_vq_affinity
The referenced patch calls set_vq_affinity without checking if the op is valid. This patch adds the check. Fixes: 3dad56823b53 ("virtio-vdpa: Support interrupt affinity spreading mechanism") Reviewed-by: Gal Pressman <gal at nvidia.com> Signed-off-by: Dragos Tatulea <dtatulea at nvidia.com> --- drivers/virtio/virt...
2023 May 04
1
[PATCH] virtio-vdpa: Fix unchecked call to NULL set_vq_affinity
On Thu, 2023-05-04 at 13:08 -0400, Feng Liu wrote: > > > On 2023-05-04 a.m.9:50, Dragos Tatulea wrote: > > External email: Use caution opening links or attachments > > > > > > The referenced patch calls set_vq_affinity without checking if the op is > > valid. This patch adds the check. > > > > Fixes: 3dad56823b53 ("virtio-vdpa: Support interrupt affinity spreading > > mechanism") > > Reviewed-by: Gal Pressman <gal at nvidia.com> > > Signed-off-by: Dragos Tat...
2023 May 04
2
[PATCH] virtio-vdpa: Fix unchecked call to NULL set_vq_affinity
On Thu, May 04, 2023 at 01:08:54PM -0400, Feng Liu wrote: > > > On 2023-05-04 a.m.9:50, Dragos Tatulea wrote: > > External email: Use caution opening links or attachments > > > > > > The referenced patch calls set_vq_affinity without checking if the op is > > valid. This patch adds the check. > > > > Fixes: 3dad56823b53 ("virtio-vdpa: Support interrupt affinity spreading mechanism") > > Reviewed-by: Gal Pressman <gal at nvidia.com> > > Signed-off-by: Dragos Tatulea <d...
2023 Mar 28
0
[PATCH v4 05/11] vduse: Support set_vq_affinity callback
? 2023/3/23 13:30, Xie Yongji ??: > Since virtio-vdpa bus driver already support interrupt > affinity spreading mechanism, let's implement the > set_vq_affinity callback to bring it to vduse device. > After we get the virtqueue's affinity, we can spread > IRQs between CPUs in the affinity mask, in a round-robin > manner, to run the irq callback. > > Signed-off-by: Xie Yongji <xieyongji at bytedance.com> Acked-by: Jason Wang &l...
2017 Jan 27
0
[PATCH 6/9] virtio: provide a method to get the IRQ affinity mask for a virtqueue
...de/linux/virtio_config.h | 3 +++ 5 files changed, 19 insertions(+) diff --git a/drivers/virtio/virtio_pci_common.c b/drivers/virtio/virtio_pci_common.c index c244212..31ba259 100644 --- a/drivers/virtio/virtio_pci_common.c +++ b/drivers/virtio/virtio_pci_common.c @@ -361,6 +361,17 @@ int vp_set_vq_affinity(struct virtqueue *vq, int cpu) return 0; } +const struct cpumask *vp_get_vq_affinity(struct virtio_device *vdev, int index) +{ + struct virtio_pci_device *vp_dev = to_vp_device(vdev); + unsigned int *map = vp_dev->msix_vector_map; + + if (!map || map[index] == VIRTIO_MSI_NO_VECTOR) + re...
2013 Mar 05
2
[PATCH vringh] virtio: Introduce vringh wrappers in virtio_config
...t a/include/linux/virtio_config.h b/include/linux/virtio_config.h index 29b9104..88dd5ae 100644 --- a/include/linux/virtio_config.h +++ b/include/linux/virtio_config.h @@ -51,7 +51,17 @@ * This returns a pointer to the bus name a la pci_name from which * the caller can then copy. * @set_vq_affinity: set the affinity for a virtqueue. + * @find_vrhs: find the host vrings and instantiate them + * vdev: the virtio_device + * nhvrs: the number of host vrings to find + * hvrs: on success, includes new host vrings + * callbacks: array of driver callbacks, for each host vring + * include a NULL e...
2013 Mar 05
2
[PATCH vringh] virtio: Introduce vringh wrappers in virtio_config
...t a/include/linux/virtio_config.h b/include/linux/virtio_config.h index 29b9104..88dd5ae 100644 --- a/include/linux/virtio_config.h +++ b/include/linux/virtio_config.h @@ -51,7 +51,17 @@ * This returns a pointer to the bus name a la pci_name from which * the caller can then copy. * @set_vq_affinity: set the affinity for a virtqueue. + * @find_vrhs: find the host vrings and instantiate them + * vdev: the virtio_device + * nhvrs: the number of host vrings to find + * hvrs: on success, includes new host vrings + * callbacks: array of driver callbacks, for each host vring + * include a NULL e...
2023 Mar 28
0
[PATCH v4 03/11] virtio-vdpa: Support interrupt affinity spreading mechanism
...; > > To support interrupt affinity spreading mechanism, > > > > > > > this makes use of group_cpus_evenly() to create > > > > > > > an irq callback affinity mask for each virtqueue > > > > > > > of vdpa device. Then we will unify set_vq_affinity > > > > > > > callback to pass the affinity to the vdpa device driver. > > > > > > > > > > > > > > Signed-off-by: Xie Yongji <xieyongji at bytedance.com> > > > > > > > > > > > > Thinking hard...
2020 Aug 19
0
[PATCH v3 04/18] virtio: Implement get_shm_region for PCI transport
...n = len; + region->addr = (u64) phys_addr + offset; + + return true; +} + static const struct virtio_config_ops virtio_pci_config_nodev_ops = { .get = NULL, .set = NULL, @@ -458,6 +551,7 @@ static const struct virtio_config_ops virtio_pci_config_nodev_ops = { .bus_name = vp_bus_name, .set_vq_affinity = vp_set_vq_affinity, .get_vq_affinity = vp_get_vq_affinity, + .get_shm_region = vp_get_shm_region, }; static const struct virtio_config_ops virtio_pci_config_ops = { @@ -474,6 +568,7 @@ static const struct virtio_config_ops virtio_pci_config_ops = { .bus_name = vp_bus_name, .set_vq_a...
2019 Mar 13
2
virtio-blk: should num_vqs be limited by num_possible_cpus()?
...a/drivers/virtio/virtio_pci_legacy.c b/drivers/virtio/virtio_pci_legacy.c index eff9ddc..69d1050 100644 --- a/drivers/virtio/virtio_pci_legacy.c +++ b/drivers/virtio/virtio_pci_legacy.c @@ -209,6 +209,7 @@ static const struct virtio_config_ops virtio_pci_config_ops = { .bus_name = vp_bus_name, .set_vq_affinity = vp_set_vq_affinity, .get_vq_affinity = vp_get_vq_affinity, + .calc_num_vqs = vp_calc_num_vqs, }; /* the PCI probing function */ diff --git a/drivers/virtio/virtio_pci_modern.c b/drivers/virtio/virtio_pci_modern.c index 07571da..f04e44a 100644 --- a/drivers/virtio/virtio_pci_modern.c +++ b...
2019 Mar 13
2
virtio-blk: should num_vqs be limited by num_possible_cpus()?
...a/drivers/virtio/virtio_pci_legacy.c b/drivers/virtio/virtio_pci_legacy.c index eff9ddc..69d1050 100644 --- a/drivers/virtio/virtio_pci_legacy.c +++ b/drivers/virtio/virtio_pci_legacy.c @@ -209,6 +209,7 @@ static const struct virtio_config_ops virtio_pci_config_ops = { .bus_name = vp_bus_name, .set_vq_affinity = vp_set_vq_affinity, .get_vq_affinity = vp_get_vq_affinity, + .calc_num_vqs = vp_calc_num_vqs, }; /* the PCI probing function */ diff --git a/drivers/virtio/virtio_pci_modern.c b/drivers/virtio/virtio_pci_modern.c index 07571da..f04e44a 100644 --- a/drivers/virtio/virtio_pci_modern.c +++ b...
2014 Dec 05
1
[PATCH RFC v2 3/4] virtio: allow finalize_features to fail
...> void (*del_vqs)(struct virtio_device *); > u64 (*get_features)(struct virtio_device *vdev); > - void (*finalize_features)(struct virtio_device *vdev); > + int (*finalize_features)(struct virtio_device *vdev); > const char *(*bus_name)(struct virtio_device *vdev); > int (*set_vq_affinity)(struct virtqueue *vq, int cpu); > }; ... > > static void virtio_ccw_get_config(struct virtio_device *vdev, > diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c > index 6b4c1113..7ddebbc 100644 > --- a/drivers/virtio/virtio.c > +++ b/drivers/virtio/virtio.c...
2014 Dec 05
1
[PATCH RFC v2 3/4] virtio: allow finalize_features to fail
...> void (*del_vqs)(struct virtio_device *); > u64 (*get_features)(struct virtio_device *vdev); > - void (*finalize_features)(struct virtio_device *vdev); > + int (*finalize_features)(struct virtio_device *vdev); > const char *(*bus_name)(struct virtio_device *vdev); > int (*set_vq_affinity)(struct virtqueue *vq, int cpu); > }; ... > > static void virtio_ccw_get_config(struct virtio_device *vdev, > diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c > index 6b4c1113..7ddebbc 100644 > --- a/drivers/virtio/virtio.c > +++ b/drivers/virtio/virtio.c...
2019 Mar 12
4
virtio-blk: should num_vqs be limited by num_possible_cpus()?
I observed that there is one msix vector for config and one shared vector for all queues in below qemu cmdline, when the num-queues for virtio-blk is more than the number of possible cpus: qemu: "-smp 4" while "-device virtio-blk-pci,drive=drive-0,id=virtblk0,num-queues=6" # cat /proc/interrupts CPU0 CPU1 CPU2 CPU3 ... ... 24: 0
2019 Mar 12
4
virtio-blk: should num_vqs be limited by num_possible_cpus()?
I observed that there is one msix vector for config and one shared vector for all queues in below qemu cmdline, when the num-queues for virtio-blk is more than the number of possible cpus: qemu: "-smp 4" while "-device virtio-blk-pci,drive=drive-0,id=virtblk0,num-queues=6" # cat /proc/interrupts CPU0 CPU1 CPU2 CPU3 ... ... 24: 0
2019 Jan 03
4
[PATCH 0/2] virtio: virtio_config_ops documentation
After the latest virtio-balloon changes, it became clear that it is not obvious that some of the virtio operations (e.g. reading or writing the config space) cannot be done from an atomic context for all transports. At least try to document that, and also fix some inconsistencies I noticed along the way. Cornelia Huck (2): virtio: fix virtio_config_ops description virtio: document
2019 Jan 03
4
[PATCH 0/2] virtio: virtio_config_ops documentation
After the latest virtio-balloon changes, it became clear that it is not obvious that some of the virtio operations (e.g. reading or writing the config space) cannot be done from an atomic context for all transports. At least try to document that, and also fix some inconsistencies I noticed along the way. Cornelia Huck (2): virtio: fix virtio_config_ops description virtio: document
2017 Jan 27
15
automatic IRQ affinity for virtio V2
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 V1: - dropped the patches already merged for 4.10-rc - new patch to
2017 Jan 27
15
automatic IRQ affinity for virtio V2
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 V1: - dropped the patches already merged for 4.10-rc - new patch to