diff options
author | Thanos Makatos <thanos.makatos@nutanix.com> | 2022-03-07 09:42:05 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-07 09:42:05 +0000 |
commit | a8d452e8e384be847377ab41a7ee19d4da71fde3 (patch) | |
tree | 53bf43c651e6f7af7b3add7034d197c6f6276dc6 /lib/dma.c | |
parent | 6bb0c5c7747499a0463c78a97591a64d1324aba7 (diff) | |
download | libvfio-user-a8d452e8e384be847377ab41a7ee19d4da71fde3.zip libvfio-user-a8d452e8e384be847377ab41a7ee19d4da71fde3.tar.gz libvfio-user-a8d452e8e384be847377ab41a7ee19d4da71fde3.tar.bz2 |
check for allowed operations in quiesce state (#647)
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
Reviewed-by: John Levon <john.levon@nutanix.com>
Diffstat (limited to 'lib/dma.c')
-rw-r--r-- | lib/dma.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -167,7 +167,9 @@ MOCK_DEFINE(dma_controller_remove_region)(dma_controller_t *dma, } if (dma_unregister != NULL) { + dma->vfu_ctx->in_cb = CB_DMA_UNREGISTER; dma_unregister(data, ®ion->info); + dma->vfu_ctx->in_cb = CB_NONE; } assert(region->refcnt == 0); @@ -203,7 +205,9 @@ dma_controller_remove_all_regions(dma_controller_t *dma, region->info.mapping.iov_base, iov_end(®ion->info.mapping)); if (dma_unregister != NULL) { + dma->vfu_ctx->in_cb = CB_DMA_UNREGISTER; dma_unregister(data, ®ion->info); + dma->vfu_ctx->in_cb = CB_NONE; } if (region->info.vaddr != NULL) { |