From c985a9a53656b50063cf2de1b29e40e02b47f415 Mon Sep 17 00:00:00 2001 From: John Levon Date: Fri, 27 May 2022 10:42:16 +0100 Subject: require quiesce for VFIO_USER_DIRTY_PAGES (#671) If we require a quiesce for these calls, we can be sure that it will not race with any usage of vfu_*_sg() calls, as a first step towards concurrency. This is not ideal for VFIO_IOMMU_DIRTY_PAGES_FLAG_GET_BITMAP, which can potentially be called multiple times during pre-copy phase, but that's something we can fix later. Signed-off-by: John Levon Reviewed-by: Thanos Makatos --- lib/libvfio-user.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib') diff --git a/lib/libvfio-user.c b/lib/libvfio-user.c index a666316..924d109 100644 --- a/lib/libvfio-user.c +++ b/lib/libvfio-user.c @@ -1310,6 +1310,9 @@ command_needs_quiesce(vfu_ctx_t *vfu_ctx, const vfu_msg_t *msg) case VFIO_USER_DEVICE_RESET: return true; + case VFIO_USER_DIRTY_PAGES: + return true; + case VFIO_USER_REGION_WRITE: if (msg->in.iov.iov_len < sizeof(*reg)) { /* -- cgit v1.1