mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
vdpa: introduce map ops
Virtio core allows the transport to provide device or transport specific mapping functions. This patch adds this support to vDPA. We can simply do this by allowing the vDPA parent to register a virtio_map_ops. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jason Wang <jasowang@redhat.com> Message-Id: <20250924070045.10361-2-jasowang@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Eugenio Pérez <eperezma@redhat.com>
This commit is contained in:
committed by
Michael S. Tsirkin
parent
58aca3dbc7
commit
0d16cc439f
@@ -466,9 +466,11 @@ static int virtio_vdpa_probe(struct vdpa_device *vdpa)
|
||||
if (!vd_dev)
|
||||
return -ENOMEM;
|
||||
|
||||
vd_dev->vdev.dev.parent = vdpa_get_map(vdpa).dma_dev;
|
||||
vd_dev->vdev.dev.parent = vdpa->map ? &vdpa->dev :
|
||||
vdpa_get_map(vdpa).dma_dev;
|
||||
vd_dev->vdev.dev.release = virtio_vdpa_release_dev;
|
||||
vd_dev->vdev.config = &virtio_vdpa_config_ops;
|
||||
vd_dev->vdev.map = vdpa->map;
|
||||
vd_dev->vdpa = vdpa;
|
||||
|
||||
vd_dev->vdev.id.device = ops->get_device_id(vdpa);
|
||||
|
||||
Reference in New Issue
Block a user