]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
vduse: switch to use virtio map API instead of DMA API
authorJason Wang <jasowang@redhat.com>
Wed, 24 Sep 2025 07:00:45 +0000 (15:00 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 1 Oct 2025 11:24:55 +0000 (07:24 -0400)
commit1c14b0e4ba988381e362ad8a9651eff0b21bd47f
tree992c7e2615ff3ebf0c537b3be34350c0f14ee402
parent0d16cc439f36355d04b17ac45c3001d90969aa44
vduse: switch to use virtio map API instead of DMA API

Lacking the support of device specific mapping supported in virtio,
VDUSE must trick the DMA API in order to make virtio-vdpa transport
work. This is done by advertising vDPA device as dma device with a
VDUSE specific dma_ops even if it doesn't do DMA at all.

This will be fixed by this patch. Thanks to the new mapping operations
support by virtio and vDPA. VDUSE can simply switch to advertise its
specific mappings operations to virtio via virtio-vdpa then DMA API is
not needed for VDUSE any more and iova domain could be used as the
mapping token instead.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20250924070045.10361-3-jasowang@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Eugenio Pérez <eperezma@redhat.com>
drivers/vdpa/Kconfig
drivers/vdpa/vdpa_user/iova_domain.c
drivers/vdpa/vdpa_user/iova_domain.h
drivers/vdpa/vdpa_user/vduse_dev.c
include/linux/virtio.h