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