diff options
author | John Levon <john.levon@nutanix.com> | 2022-05-27 10:42:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-27 10:42:16 +0100 |
commit | c985a9a53656b50063cf2de1b29e40e02b47f415 (patch) | |
tree | f1b3efb016f65b174f0a7443aa1127dfc3d56a0a /lib/libvfio-user.c | |
parent | b52bff72d4eb646a453d19e19ddbd13ed6111a09 (diff) | |
download | libvfio-user-c985a9a53656b50063cf2de1b29e40e02b47f415.zip libvfio-user-c985a9a53656b50063cf2de1b29e40e02b47f415.tar.gz libvfio-user-c985a9a53656b50063cf2de1b29e40e02b47f415.tar.bz2 |
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 <john.levon@nutanix.com>
Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
Diffstat (limited to 'lib/libvfio-user.c')
-rw-r--r-- | lib/libvfio-user.c | 3 |
1 files changed, 3 insertions, 0 deletions
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)) { /* |