提交 d831d8a7 编写于 作者: J Jason Wang 提交者: Pengyuan Zhao

vp_vdpa: switch to use vp_modern_map_vq_notify()

stable inclusion
from stable-v5.13
commit 11d8ffed
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I5WXCZ
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=11d8ffed00b231356008b35a3b0bc192e42333fa

----------------------------------------------------------------------

This patch switches to use vp_vdpa to use vp_modern_map_notify().
Signed-off-by: NJason Wang <jasowang@redhat.com>
Link: https://lore.kernel.org/r/20210415073147.19331-4-jasowang@redhat.comSigned-off-by: NMichael S. Tsirkin <mst@redhat.com>
Reviewed-by: NEli Cohen <elic@nvidia.com>
Signed-off-by: NPengyuan Zhao <zhaopengyuan@hisilicon.com>
上级 7dd42945
......@@ -377,7 +377,6 @@ static int vp_vdpa_probe(struct pci_dev *pdev, const struct pci_device_id *id)
struct virtio_pci_modern_device *mdev;
struct device *dev = &pdev->dev;
struct vp_vdpa *vp_vdpa;
u16 notify_off;
int ret, i;
ret = pcim_enable_device(pdev);
......@@ -423,10 +422,12 @@ static int vp_vdpa_probe(struct pci_dev *pdev, const struct pci_device_id *id)
}
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].notify = mdev->notify_base +
notify_off * mdev->notify_offset_multiplier;
vp_vdpa->vring[i].notify = vp_modern_map_vq_notify(mdev, i);
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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册