@@ -17,6 +17,7 @@
#else /* !CONFIG_LIBPMEM */
void *pmem_memcpy_persist(void *pmemdest, const void *src, size_t len);
+void pmem_persist(const void *addr, size_t len);
#endif /* CONFIG_LIBPMEM */
@@ -33,6 +33,7 @@
#include "qemu/bitops.h"
#include "qemu/bitmap.h"
#include "qemu/main-loop.h"
+#include "qemu/pmem.h"
#include "xbzrle.h"
#include "ram.h"
#include "migration.h"
@@ -3046,6 +3047,13 @@ static int ram_load_setup(QEMUFile *f, void *opaque)
static int ram_load_cleanup(void *opaque)
{
RAMBlock *rb;
+
+ RAMBLOCK_FOREACH_MIGRATABLE(rb) {
+ if (ramblock_is_pmem(rb)) {
+ pmem_persist(rb->host, rb->used_length);
+ }
+ }
+
xbzrle_load_cleanup();
compress_threads_load_cleanup();
@@ -17,3 +17,7 @@ void *pmem_memcpy_persist(void *pmemdest, const void *src, size_t len)
{
return memcpy(pmemdest, src, len);
}
+
+void pmem_persist(const void *addr, size_t len)
+{
+}