Skip to content

migration/ram: Assert RAMBlock stability while streaming RAM

Akihiko Odaki kvm linux-edac qemu-arm qemu-devel qemu-riscv 2 versions – New

Get series with b4
b4 am [email protected] change-id 20260606-ram-dcef14f001fb

Versions newest first

  1. v2 Latest7 patches 0 repliesNew
  2. v13 patches 5 repliesSuperseded

Changes in v2 from the cover letter

- 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/[email protected]

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7hw/nvram/fw_cfg: Remove acpi-mr-restorehw/core/machine.c hw/nvram/fw_cfg.c include/hw/nvram/fw_cfg.h+1 -90 replies
2/7hw/nvram/fw_cfg: Avoid resizing RAM at runtimehw/acpi/ghes.c hw/acpi/vmgenid.c hw/arm/virt-acpi-build.c +10 more+77 -420 replies
3/7system/memory: Remove the resized callbackhw/core/loader.c include/system/memory.h include/system/ramblock.h +2 more+10 -360 replies
4/7system/physmem: Pass RAMBlock to RAMBlockNotifier callbacksblock/block-ram-registrar.c hw/core/numa.c hw/xen/xen-mapcache.c +6 more+43 -450 replies
5/7system/physmem: Notify RAMBlock migratable and idstr changeshw/core/numa.c include/system/ramlist.h system/physmem.c+51 -00 replies
6/7migration/ram: Fix ram_save_complete() return valuemigration/ram.c+1 -10 replies
7/7migration/ram: Assert RAMBlock stability while streaming RAMinclude/migration/misc.h migration/ram.c+68 -280 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

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

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.

---
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/[email protected]

---
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,

Signature · 1 line
Akihiko Odaki <[email protected]>