[PATCH v2 0/7] migration/ram: Assert RAMBlock stability while streaming RAM

Akihiko Odaki posted 7 patches 1 day, 14 hours ago
Failed in applying to current master (apply log)
There is a newer version of this series
include/hw/core/loader.h       |   1 +
include/hw/nvram/fw_cfg.h      |   5 +-
include/migration/misc.h       |   2 +-
include/system/memory.h        |   4 --
include/system/ramblock.h      |   7 +--
include/system/ramlist.h       |  24 ++++++----
block/block-ram-registrar.c    |   8 ++--
hw/acpi/ghes.c                 |   6 ++-
hw/acpi/vmgenid.c              |   1 +
hw/arm/virt-acpi-build.c       |   3 +-
hw/core/loader.c               |  14 +++---
hw/core/machine.c              |   1 -
hw/core/numa.c                 |  54 +++++++++++++++++----
hw/display/ramfb.c             |   2 +-
hw/i386/acpi-build.c           |   3 +-
hw/isa/lpc_ich9.c              |   2 +
hw/loongarch/virt-acpi-build.c |   3 +-
hw/misc/vmcoreinfo.c           |   3 +-
hw/nvram/fw_cfg.c              |  80 ++++++++++++++++++-------------
hw/riscv/virt-acpi-build.c     |   3 +-
hw/xen/xen-mapcache.c          |   6 +--
migration/ram.c                | 106 +++++++++++++++++++++++++++--------------
system/memory.c                |   7 +--
system/physmem.c               |  40 +++++++---------
target/i386/nvmm/nvmm-all.c    |   4 +-
target/i386/sev.c              |   8 ++--
util/vfio-helpers.c            |   7 +--
27 files changed, 247 insertions(+), 157 deletions(-)
[PATCH v2 0/7] migration/ram: Assert RAMBlock stability while streaming RAM
Posted by Akihiko Odaki 1 day, 14 hours ago
RAM migration sends the RAMBlock list and sizes before transferring page
contents. The RAM code cannot cope with migratable RAMBlocks being
added, removed, renamed, made migratable/non-migratable, or resized
while that stream is active, because the destination has already parsed
the stream layout.

Add RAMBlock notifier checks so such changes are caught immediately.
Ignored RAMBlocks remain exempt because they are not represented in the
RAM migration stream.

Signed-off-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
---
Changes in v2:
- Added patch "hw/nvram/fw_cfg: Remove acpi-mr-restore".
- Added patch "hw/nvram/fw_cfg: Avoid resizing RAM at runtime".
- Added patch "migration/ram: Fix ram_save_complete() return value".
- Link to v1: https://lore.kernel.org/qemu-devel/20260611-ram-v1-0-a2dacf699718@rsg.ci.i.u-tokyo.ac.jp

---
Akihiko Odaki (7):
      hw/nvram/fw_cfg: Remove acpi-mr-restore
      hw/nvram/fw_cfg: Avoid resizing RAM at runtime
      system/memory: Remove the resized callback
      system/physmem: Pass RAMBlock to RAMBlockNotifier callbacks
      system/physmem: Notify RAMBlock migratable and idstr changes
      migration/ram: Fix ram_save_complete() return value
      migration/ram: Assert RAMBlock stability while streaming RAM

 include/hw/core/loader.h       |   1 +
 include/hw/nvram/fw_cfg.h      |   5 +-
 include/migration/misc.h       |   2 +-
 include/system/memory.h        |   4 --
 include/system/ramblock.h      |   7 +--
 include/system/ramlist.h       |  24 ++++++----
 block/block-ram-registrar.c    |   8 ++--
 hw/acpi/ghes.c                 |   6 ++-
 hw/acpi/vmgenid.c              |   1 +
 hw/arm/virt-acpi-build.c       |   3 +-
 hw/core/loader.c               |  14 +++---
 hw/core/machine.c              |   1 -
 hw/core/numa.c                 |  54 +++++++++++++++++----
 hw/display/ramfb.c             |   2 +-
 hw/i386/acpi-build.c           |   3 +-
 hw/isa/lpc_ich9.c              |   2 +
 hw/loongarch/virt-acpi-build.c |   3 +-
 hw/misc/vmcoreinfo.c           |   3 +-
 hw/nvram/fw_cfg.c              |  80 ++++++++++++++++++-------------
 hw/riscv/virt-acpi-build.c     |   3 +-
 hw/xen/xen-mapcache.c          |   6 +--
 migration/ram.c                | 106 +++++++++++++++++++++++++++--------------
 system/memory.c                |   7 +--
 system/physmem.c               |  40 +++++++---------
 target/i386/nvmm/nvmm-all.c    |   4 +-
 target/i386/sev.c              |   8 ++--
 util/vfio-helpers.c            |   7 +--
 27 files changed, 247 insertions(+), 157 deletions(-)
---
base-commit: b83371668192a705b878e909c5ae9c1233cbd5fb
change-id: 20260606-ram-dcef14f001fb

Best regards,
--  
Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>