Commit 11d8ffed authored by Jason Wang's avatar Jason Wang Committed by Michael S. Tsirkin

vp_vdpa: switch to use vp_modern_map_vq_notify()

This patch switches to use vp_vdpa to use vp_modern_map_notify().
Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
Link: https://lore.kernel.org/r/20210415073147.19331-4-jasowang@redhat.comSigned-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Reviewed-by: default avatarEli Cohen <elic@nvidia.com>
parent 7dca6c0e
...@@ -369,7 +369,6 @@ static int vp_vdpa_probe(struct pci_dev *pdev, const struct pci_device_id *id) ...@@ -369,7 +369,6 @@ static int vp_vdpa_probe(struct pci_dev *pdev, const struct pci_device_id *id)
struct virtio_pci_modern_device *mdev; struct virtio_pci_modern_device *mdev;
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
struct vp_vdpa *vp_vdpa; struct vp_vdpa *vp_vdpa;
u16 notify_off;
int ret, i; int ret, i;
ret = pcim_enable_device(pdev); ret = pcim_enable_device(pdev);
...@@ -415,10 +414,12 @@ static int vp_vdpa_probe(struct pci_dev *pdev, const struct pci_device_id *id) ...@@ -415,10 +414,12 @@ static int vp_vdpa_probe(struct pci_dev *pdev, const struct pci_device_id *id)
} }
for (i = 0; i < vp_vdpa->queues; i++) { for (i = 0; i < vp_vdpa->queues; i++) {
notify_off = vp_modern_get_queue_notify_off(mdev, i);
vp_vdpa->vring[i].irq = VIRTIO_MSI_NO_VECTOR; vp_vdpa->vring[i].irq = VIRTIO_MSI_NO_VECTOR;
vp_vdpa->vring[i].notify = mdev->notify_base + vp_vdpa->vring[i].notify = vp_modern_map_vq_notify(mdev, i);
notify_off * mdev->notify_offset_multiplier; if (!vp_vdpa->vring[i].notify) {
dev_warn(&pdev->dev, "Fail to map vq notify %d\n", i);
goto err;
}
} }
vp_vdpa->config_irq = VIRTIO_MSI_NO_VECTOR; vp_vdpa->config_irq = VIRTIO_MSI_NO_VECTOR;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment