]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
virtio_ring: skip unmap for premapped
authorXuan Zhuo <xuanzhuo@linux.alibaba.com>
Thu, 10 Aug 2023 12:30:51 +0000 (20:30 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Sun, 3 Sep 2023 22:10:23 +0000 (18:10 -0400)
commitb319940f83c21bb4c1fabffe68a862be879a6193
tree5d69c2538deabac5419fb3eef41fc0e1d14346e2
parent2df64759071bdca2a12edb9af4f071e4419ad745
virtio_ring: skip unmap for premapped

Now we add a case where we skip dma unmap, the vq->premapped is true.

We can't just rely on use_dma_api to determine whether to skip the dma
operation. For convenience, I introduced the "do_unmap". By default, it
is the same as use_dma_api. If the driver is configured with premapped,
then do_unmap is false.

So as long as do_unmap is false, for addr of desc, we should skip dma
unmap operation.

Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Message-Id: <20230810123057.43407-7-xuanzhuo@linux.alibaba.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/virtio/virtio_ring.c