diff options
author | Thanos Makatos <thanos.makatos@nutanix.com> | 2021-03-01 11:19:50 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-01 11:19:50 +0000 |
commit | f1057091f5eb2b7a91a2423503aea1c340f16831 (patch) | |
tree | 85af251cd6342123eaaa3cdf2d77b5e32f2fcac4 /test/mocks.h | |
parent | bb0ea196f62bfad9f4ef89ab20824a16644c6b0e (diff) | |
download | libvfio-user-f1057091f5eb2b7a91a2423503aea1c340f16831.zip libvfio-user-f1057091f5eb2b7a91a2423503aea1c340f16831.tar.gz libvfio-user-f1057091f5eb2b7a91a2423503aea1c340f16831.tar.bz2 |
don't call user's unmap_dma callback when removing DMA region (#370)
Plus unit tests.
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
Reported-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: John Levon <john.levon@nutanix.com>
Diffstat (limited to 'test/mocks.h')
-rw-r--r-- | test/mocks.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/mocks.h b/test/mocks.h index 6f5765b..0c3d909 100644 --- a/test/mocks.h +++ b/test/mocks.h @@ -55,6 +55,11 @@ __real_dma_controller_add_region(dma_controller_t *dma, dma_addr_t dma_addr, size_t size, int fd, off_t offset, uint32_t prot); +int +__real_dma_controller_remove_region(dma_controller_t *dma, + dma_addr_t dma_addr, size_t size, + vfu_unmap_dma_cb_t *unmap_dma, void *data); + bool __real_device_is_stopped(struct migration *migr); |