On 7/6/23 17:18, Steve Sistare wrote:
migrate_ignore_shared() is an optimization that avoids copying memory
that is visible and can be mapped on the target. However, a
memory-backend-ram or a memory-backend-memfd block with the RAM_SHARED
flag set is not migrated when migrate_ignore_shared() is true. This is
wrong, because the block has no named backing store, and its contents will
be lost. To fix, ignore shared memory iff it is a named file. Define a
new flag RAM_NAMED_FILE to distinguish this case.
Signed-off-by: Steve Sistare <steven.sist...@oracle.com>
Reviewed-by: Peter Xu <pet...@redhat.com>
---
backends/hostmem-file.c | 1 +
include/exec/cpu-common.h | 1 +
include/exec/memory.h | 3 +++
migration/ram.c | 3 ++-
qapi/migration.json | 4 ++--
softmmu/physmem.c | 7 ++++++-
6 files changed, 15 insertions(+), 4 deletions(-)
I'm taking this in my next PR, thanks.