summary refs log tree commit diff stats
path: root/include/exec/memory.h
diff options
context:
space:
mode:
authorSteve Sistare <steven.sistare@oracle.com>2025-02-27 06:48:01 -0800
committerFabiano Rosas <farosas@suse.de>2025-03-10 12:09:24 -0300
commit094a3dbc55df1bbd2169eaf784cb75b594a72941 (patch)
treea69d66ac646d68ba84400fbe178ca6e5ae62f909 /include/exec/memory.h
parentd657a14de5d597bbfe7b54e4c4f0646f440e98ad (diff)
downloadfocaccia-qemu-094a3dbc55df1bbd2169eaf784cb75b594a72941.tar.gz
focaccia-qemu-094a3dbc55df1bbd2169eaf784cb75b594a72941.zip
migration: ram block cpr blockers
Unlike cpr-reboot mode, cpr-transfer mode cannot save volatile ram blocks
in the migration stream file and recreate them later, because the physical
memory for the blocks is pinned and registered for vfio.  Add a blocker
for volatile ram blocks.

Also add a blocker for RAM_GUEST_MEMFD.  Preserving guest_memfd may be
sufficient for CPR, but it has not been tested yet.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Message-ID: <1740667681-257312-1-git-send-email-steven.sistare@oracle.com>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Diffstat (limited to 'include/exec/memory.h')
-rw-r--r--include/exec/memory.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/exec/memory.h b/include/exec/memory.h
index 78c4e0aec8..d09af58c97 100644
--- a/include/exec/memory.h
+++ b/include/exec/memory.h
@@ -3203,6 +3203,9 @@ bool ram_block_discard_is_disabled(void);
  */
 bool ram_block_discard_is_required(void);
 
+void ram_block_add_cpr_blocker(RAMBlock *rb, Error **errp);
+void ram_block_del_cpr_blocker(RAMBlock *rb);
+
 #endif
 
 #endif