vdpa_sim: get rid of DMA ops
authorJason Wang <jasowang@redhat.com>
Fri, 23 Dec 2022 06:00:21 +0000 (14:00 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 21 Feb 2023 00:26:58 +0000 (19:26 -0500)
commit6c3d329e6486dd079924eba9b791309026b8ea9c
tree3d3f7ca3a9689c21f23abf5f6d6410c21c7ca5c4
parent0899774cb360769583e91d1951a68af47ce88db2
vdpa_sim: get rid of DMA ops

We used to (ab)use the DMA ops for setting up identical mappings in
the IOTLB. This patch tries to get rid of the those unnecessary DMA
ops by maintaining a simple identical/passthrough mappings by
default. When bound to virtio_vdpa driver, DMA API will simply use PA
as the IOVA and we will be all fine. When the vDPA bus tries to setup
customized mapping (e.g when bound to vhost-vDPA), the
identical/passthrough mapping will be removed.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20221223060021.28011-1-jasowang@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Christoph Hellwig <hch@lst.de>
drivers/vdpa/vdpa_sim/vdpa_sim.c
drivers/vdpa/vdpa_sim/vdpa_sim.h