From cfe9901919943f14961e1da1c4a823336ff79555 Mon Sep 17 00:00:00 2001 From: Thanos Makatos Date: Thu, 20 May 2021 17:10:51 +0100 Subject: 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 Reviewed-by: John Levon --- lib/private.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/private.h') diff --git a/lib/private.h b/lib/private.h index 97b2469..2d84fb8 100644 --- a/lib/private.h +++ b/lib/private.h @@ -192,6 +192,13 @@ MOCK_DECLARE(int, exec_command, vfu_ctx_t *vfu_ctx, vfu_msg_t *msg); MOCK_DECLARE(int, process_request, vfu_ctx_t *vfu_ctx); +MOCK_DECLARE(int, handle_dirty_pages_get, vfu_ctx_t *vfu_ctx, + struct iovec **iovecs, size_t *nr_iovecs, + struct vfio_user_bitmap_range *ranges, uint32_t size); + +int +handle_device_reset(vfu_ctx_t *vfu_ctx, vfu_reset_type_t reason); + #endif /* LIB_VFIO_USER_PRIVATE_H */ /* ex: set tabstop=4 shiftwidth=4 softtabstop=4 expandtab: */ -- cgit v1.1