diff options
| author | Peter Maydell | 2018-08-21 11:23:53 +0200 |
|---|---|---|
| committer | Peter Maydell | 2018-08-21 11:23:53 +0200 |
| commit | 55f4e79d794d94b2ab22b0dc99c6b05abc628656 (patch) | |
| tree | 67f9e9097c5aec4b238a0d69f59ff4f718d1a57d /migration/ram.c | |
| parent | Merge remote-tracking branch 'remotes/mcayland/tags/qemu-sparc.for-upstream-2... (diff) | |
| parent | migration/ram: ensure write persistence on loading all data to PMEM. (diff) | |
| download | qemu-55f4e79d794d94b2ab22b0dc99c6b05abc628656.tar.gz qemu-55f4e79d794d94b2ab22b0dc99c6b05abc628656.tar.xz qemu-55f4e79d794d94b2ab22b0dc99c6b05abc628656.zip | |
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging
pc: fixes
This includes nvdimm persistence fixes queued before the release.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
# gpg: Signature made Mon 20 Aug 2018 11:38:11 BST
# gpg: using RSA key 281F0DB8D28D5469
# gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>"
# gpg: aka "Michael S. Tsirkin <mst@redhat.com>"
# Primary key fingerprint: 0270 606B 6F3C DF3D 0B17 0970 C350 3912 AFBE 8E67
# Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA 8A0D 281F 0DB8 D28D 5469
* remotes/mst/tags/for_upstream:
migration/ram: ensure write persistence on loading all data to PMEM.
migration/ram: Add check and info message to nvdimm post copy.
mem/nvdimm: ensure write persistence to PMEM in label emulation
hostmem-file: add the 'pmem' option
configure: add libpmem support
memory, exec: switch file ram allocation functions to 'flags' parameters
memory, exec: Expose all memory block related flags.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'migration/ram.c')
| -rw-r--r-- | migration/ram.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/migration/ram.c b/migration/ram.c index 24dea2730c..fa79d0a5b9 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -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" @@ -3547,6 +3548,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(); @@ -3906,6 +3914,15 @@ static int ram_load(QEMUFile *f, void *opaque, int version_id) static bool ram_has_postcopy(void *opaque) { + RAMBlock *rb; + RAMBLOCK_FOREACH_MIGRATABLE(rb) { + if (ramblock_is_pmem(rb)) { + info_report("Block: %s, host: %p is a nvdimm memory, postcopy" + "is not supported now!", rb->idstr, rb->host); + return false; + } + } + return migrate_postcopy_ram(); } |
