diff options
author | Thanos Makatos <thanos.makatos@nutanix.com> | 2021-05-20 17:10:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-20 17:10:51 +0100 |
commit | cfe9901919943f14961e1da1c4a823336ff79555 (patch) | |
tree | 2b5d8915bbbea8d239684e3334c9926fb910fc2c /test/mocks.h | |
parent | 947941de95bf2c3f723b37151d67fb129fd01841 (diff) | |
download | libvfio-user-cfe9901919943f14961e1da1c4a823336ff79555.zip libvfio-user-cfe9901919943f14961e1da1c4a823336ff79555.tar.gz libvfio-user-cfe9901919943f14961e1da1c4a823336ff79555.tar.bz2 |
migration: various dirty page tracking fixes (#457)
- document how to use a vfio-user device with libvirt
- document how to use SPDK's nvmf/vfio-user target with libvirt
- replace vfio_bitmap with vfio_user_bitmap and vfio_iommu_type1_dirty_bitmap_get with vfio_user_bitmap_range
- fix bug for calculating number of pages needed for dirty page bitmap
- align number of bytes for dirty page bitmap to QWORD
- add debug messages around dirty page tracking
- only support flags=0 when doing DMA unmap
- set device state to running after reset
- allow region read/write even if device is in stopped state
- allow transitioning from stopped/stop-and-copy state to running state
- fix unit tests
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.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 496cc54..7547956 100644 --- a/test/mocks.h +++ b/test/mocks.h @@ -38,4 +38,9 @@ void mock_dma_register(vfu_ctx_t *vfu_ctx, vfu_dma_info_t *info); int mock_dma_unregister(vfu_ctx_t *vfu_ctx, vfu_dma_info_t *info); +int mock_reset_cb(vfu_ctx_t *vfu_ctx, vfu_reset_type_t type); + +int mock_notify_migr_state_trans_cb(vfu_ctx_t *vfu_ctx, + vfu_migr_state_t vfu_state); + /* ex: set tabstop=4 shiftwidth=4 softtabstop=4 expandtab: */ |