vduse: Support using userspace pages as bounce buffer
authorXie Yongji <xieyongji@bytedance.com>
Wed, 3 Aug 2022 04:55:21 +0000 (12:55 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 11 Aug 2022 08:26:08 +0000 (04:26 -0400)
commit6c77ed22880d3e8ae91b1d2cce26dbd6c69f38b7
treed0342af57794fca63459d51b78c274e81ef06748
parent82eb46f94ae5faa87ace248d950292c87384a097
vduse: Support using userspace pages as bounce buffer

Introduce two APIs: vduse_domain_add_user_bounce_pages()
and vduse_domain_remove_user_bounce_pages() to support
adding and removing userspace pages for bounce buffers.
During adding and removing, the DMA data would be copied
from the kernel bounce pages to the userspace bounce pages
and back.

Signed-off-by: Xie Yongji <xieyongji@bytedance.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20220803045523.23851-4-xieyongji@bytedance.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/vdpa/vdpa_user/iova_domain.c
drivers/vdpa/vdpa_user/iova_domain.h