From ff70ca1a9f97feae62e326eca39624c13aa8117f Mon Sep 17 00:00:00 2001 From: swapnili Date: Thu, 17 Dec 2020 14:17:38 +0100 Subject: General fixes (#213) * Reorg vfu_create_ctx() * Unconditionally call dma_controller_create() in vfu_setup_device_dma_cb(). * Added UT for vfu_setup_device_dma_cb() Signed-off-by: Swapnil Ingle Reviewed-by: Thanos Makatos --- include/libvfio-user.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/libvfio-user.h') diff --git a/include/libvfio-user.h b/include/libvfio-user.h index 1a336374..89e1c85 100644 --- a/include/libvfio-user.h +++ b/include/libvfio-user.h @@ -287,7 +287,9 @@ typedef void (vfu_map_dma_cb_t) (void *pvt, uint64_t iova, uint64_t len); typedef int (vfu_unmap_dma_cb_t) (void *pvt, uint64_t iova, uint64_t len); /** - * Setup device DMA map/unmap callbacks. + * Setup device DMA map/unmap callbacks. This will also enable bookkeeping of + * DMA regions received from client, otherwise they will be just acknowledged. + * * @vfu_ctx: the libvfio-user context * @map_dma: DMA region map callback (optional) * @unmap_dma: DMA region unmap callback (optional) -- cgit v1.1