459f93
From 9c2fd182a02d64004e30900c52e3fcdb550de0bd Mon Sep 17 00:00:00 2001
459f93
Message-Id: <9c2fd182a02d64004e30900c52e3fcdb550de0bd@dist-git>
459f93
From: Jiri Denemark <jdenemar@redhat.com>
459f93
Date: Wed, 22 Jun 2022 16:35:50 +0200
459f93
Subject: [PATCH] Add VIR_MIGRATE_ZEROCOPY flag
459f93
MIME-Version: 1.0
459f93
Content-Type: text/plain; charset=UTF-8
459f93
Content-Transfer-Encoding: 8bit
459f93
459f93
The flag can be used to enable zero-copy mechanism for migrating memory
459f93
pages.
459f93
459f93
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
459f93
Reviewed-by: Ján Tomko <jtomko@redhat.com>
459f93
(cherry picked from commit 8744beecb36600e773c8a8c4823db2bf4b3e262d)
459f93
459f93
https://bugzilla.redhat.com/show_bug.cgi?id=2089433
459f93
459f93
Conflicts:
459f93
	include/libvirt/libvirt-domain.h
459f93
            - post-copy recovery not backported
459f93
459f93
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
459f93
---
459f93
 include/libvirt/libvirt-domain.h | 8 ++++++++
459f93
 1 file changed, 8 insertions(+)
459f93
459f93
diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h
459f93
index 5f0a9b7572..792973ce2d 100644
459f93
--- a/include/libvirt/libvirt-domain.h
459f93
+++ b/include/libvirt/libvirt-domain.h
459f93
@@ -860,6 +860,14 @@ typedef enum {
459f93
       */
459f93
     VIR_MIGRATE_NON_SHARED_SYNCHRONOUS_WRITES = (1 << 18),
459f93
 
459f93
+    /* Use zero-copy mechanism for migrating memory pages. For QEMU/KVM this
459f93
+     * means QEMU will be temporarily allowed to lock all guest pages in host's
459f93
+     * memory, although only those that are queued for transfer will be locked
459f93
+     * at the same time.
459f93
+     *
459f93
+     * Since: 8.5.0
459f93
+     */
459f93
+    VIR_MIGRATE_ZEROCOPY = (1 << 20),
459f93
 } virDomainMigrateFlags;
459f93
 
459f93
 
459f93
-- 
459f93
2.35.1
459f93