diff options
author | John Levon <john.levon@nutanix.com> | 2021-05-10 12:59:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-10 12:59:01 +0100 |
commit | b95c886ed23b4cc4c539030bf383b55aae8859a3 (patch) | |
tree | d032be6eff881d8ff69ea94a29b459546876d97a /include/libvfio-user.h | |
parent | 12ee57e1101e7059361d41011211bc4e8aef20fc (diff) | |
download | libvfio-user-b95c886ed23b4cc4c539030bf383b55aae8859a3.zip libvfio-user-b95c886ed23b4cc4c539030bf383b55aae8859a3.tar.gz libvfio-user-b95c886ed23b4cc4c539030bf383b55aae8859a3.tar.bz2 |
fix dma unregister callback during region removal (#464)
There are two issues with the unregister callback:
- we were requiring the callback to be set when removing a region, but it's
only required if a consumer wants to map regions
- when we removed all regions (for example, on a reset), we weren't triggering
the callback
Signed-off-by: John Levon <john.levon@nutanix.com>
swapnil code review
add assert
Reviewed-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
Diffstat (limited to 'include/libvfio-user.h')
-rw-r--r-- | include/libvfio-user.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/libvfio-user.h b/include/libvfio-user.h index a5dcc75..28933a5 100644 --- a/include/libvfio-user.h +++ b/include/libvfio-user.h @@ -655,7 +655,9 @@ vfu_unmap_sg(vfu_ctx_t *vfu_ctx, const dma_sg_t *sg, struct iovec *iov, int cnt); /** - * Read from the dma region exposed by the client. + * Read from the dma region exposed by the client. This can be used as an + * alternative to vfu_map_sg(), if the region is not directly mappable, or DMA + * notification callbacks have not been provided. * * @vfu_ctx: the libvfio-user context * @sg: a DMA segment obtained from dma_addr_to_sg @@ -667,7 +669,9 @@ int vfu_dma_read(vfu_ctx_t *vfu_ctx, dma_sg_t *sg, void *data); /** - * Write to the dma region exposed by the client. + * Write to the dma region exposed by the client. This can be used as an + * alternative to vfu_map_sg(), if the region is not directly mappable, or DMA + * notification callbacks have not been provided. * * @vfu_ctx: the libvfio-user context * @sg: a DMA segment obtained from dma_addr_to_sg |