summaryrefslogtreecommitdiff
path: root/drivers/vdpa/virtio_pci
diff options
context:
space:
mode:
authorGautam Dawar <gautam.dawar@xilinx.com>2022-03-30 21:03:46 +0300
committerMichael S. Tsirkin <mst@redhat.com>2022-05-31 19:44:27 +0300
commitdb9adcbf4286ad1c1fca091a870db6e49bb0df07 (patch)
tree2d2c265ee15bf7ddf4db3adf8083f136213ffb36 /drivers/vdpa/virtio_pci
parentd4821902e43453b85b31329441a9f6ac071228a8 (diff)
downloadlinux-db9adcbf4286ad1c1fca091a870db6e49bb0df07.tar.xz
vdpa: multiple address spaces support
This patches introduces the multiple address spaces support for vDPA device. This idea is to identify a specific address space via an dedicated identifier - ASID. During vDPA device allocation, vDPA device driver needs to report the number of address spaces supported by the device then the DMA mapping ops of the vDPA device needs to be extended to support ASID. This helps to isolate the environments for the virtqueue that will not be assigned directly. E.g in the case of virtio-net, the control virtqueue will not be assigned directly to guest. As a start, simply claim 1 virtqueue groups and 1 address spaces for all vDPA devices. And vhost-vDPA will simply reject the device with more than 1 virtqueue groups or address spaces. Signed-off-by: Jason Wang <jasowang@redhat.com> Signed-off-by: Gautam Dawar <gdawar@xilinx.com> Message-Id: <20220330180436.24644-7-gdawar@xilinx.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/vdpa/virtio_pci')
-rw-r--r--drivers/vdpa/virtio_pci/vp_vdpa.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/vdpa/virtio_pci/vp_vdpa.c b/drivers/vdpa/virtio_pci/vp_vdpa.c
index e18dfe993901..35acba0e8d6d 100644
--- a/drivers/vdpa/virtio_pci/vp_vdpa.c
+++ b/drivers/vdpa/virtio_pci/vp_vdpa.c
@@ -466,7 +466,7 @@ static int vp_vdpa_probe(struct pci_dev *pdev, const struct pci_device_id *id)
return ret;
vp_vdpa = vdpa_alloc_device(struct vp_vdpa, vdpa,
- dev, &vp_vdpa_ops, 1, NULL, false);
+ dev, &vp_vdpa_ops, 1, 1, NULL, false);
if (IS_ERR(vp_vdpa)) {
dev_err(dev, "vp_vdpa: Failed to allocate vDPA structure\n");
return PTR_ERR(vp_vdpa);