qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH V3] memory: RAM_NAMED_FILE flag


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH V3] memory: RAM_NAMED_FILE flag
Date: Tue, 13 Jun 2023 11:33:33 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.11.2

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.sistare@oracle.com>
Reviewed-by: Peter Xu <peterx@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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]