linux/drivers/vdpa
Zhu Lingshan 9b3e814834 vDPA/ifcvf: implement shared IRQ feature
On some platforms/devices, there may not be enough MSI vectors
allocated for the virtqueues and config changes. In such a case,
the interrupt sources(virtqueues, config changes) must share
an IRQ/vector, to avoid initialization failures, keep
the device functional.

This commit handles three cases:
(1) number of the allocated vectors == the number of virtqueues + 1
(config changes), every virtqueue and the config interrupt has
a separated vector/IRQ, the best and the most likely case.
(2) number of the allocated vectors is less than the best case, but
greater than 1. In this case, all virtqueues share a vector/IRQ,
the config interrupt has a separated vector/IRQ
(3) only one vector is allocated, in this case, the virtqueues and
the config interrupt share a vector/IRQ. The worst and most
unlikely case.

Otherwise, it needs to fail.

This commit introduces some helper functions:
ifcvf_set_vq_vector() and ifcvf_set_config_vector() sets virtqueue
vector and config vector in the device config space, so that
the device can send interrupt DMA.

Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com>
Link: https://lore.kernel.org/r/20220222115428.998334-5-lingshan.zhu@intel.com
Signed-off-by: Tom Rix <trix@redhat.com>
Link: https://lore.kernel.org/r/20220315124130.1710030-1-trix@redhat.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2022-03-28 16:52:57 -04:00
..
alibaba vdpa: Provide interface to read driver features 2022-01-14 18:50:53 -05:00
ifcvf vDPA/ifcvf: implement shared IRQ feature 2022-03-28 16:52:57 -04:00
mlx5 vdpa/mlx5: add validation for VIRTIO_NET_CTRL_MQ_VQ_PAIRS_SET command 2022-03-04 11:56:34 -05:00
vdpa_sim vdpa/vdpa_sim_net: Report max device capabilities 2022-01-14 18:50:54 -05:00
vdpa_user vduse: Fix returning wrong type in vduse_domain_alloc_iova() 2022-03-04 11:56:34 -05:00
virtio_pci vdpa: fix use-after-free on vp_vdpa_remove 2022-03-06 06:06:50 -05:00
Kconfig eni_vdpa: add vDPA driver for Alibaba ENI 2021-11-01 05:23:41 -04:00
Makefile eni_vdpa: add vDPA driver for Alibaba ENI 2021-11-01 05:23:41 -04:00
vdpa.c vdpa: factor out vdpa_set_features_unlocked for vdpa internal use 2022-03-04 11:56:33 -05:00