Skip to content

aspeed, highbank: fix RAM migration oddities

Peter Maydell qemu-arm qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3hw/arm/highbank: don't make sysram 'nomigrate'hw/arm/highbank.c+1 -10 replies
2/3hw/arm/aspeed: don't make 'boot_rom' region 'nomigrate'hw/arm/aspeed.c+1 -13 replies
3/3hw/arm/aspeed_soc: don't use vmstate_register_ram_global for SRAMhw/arm/aspeed_soc.c+1 -21 reply

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchCédric Le Goater
1/3
2/3R-b T-b
3/3R-b T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [Qemu-arm] [PATCH 0/3] aspeed, highbank: fix RAM migration oddities

In a couple of places in the highbank and aspeed boards, we create RAM regions with memory_region_init_ram_nomigrate() and then either:
* don't call vmstate_register_ram()
* from a device, register it with vmstate_register_ram_global()

The first case is a bug. Currently it means that the underlying RAM block will have a name which is the empty string; it will migrate, but if there is more than one such RAM block in the system migration will fail. Future changes to the migration code are likely to mean that the RAM block isn't migrated at all.

The second case is also a bug: since the name used for the RAM block is global to all of QEMU, it means that you can't have more than one instance of the device without QEMU abort()ing because of the name clash.

Fix both of these by using memory_region_init_ram(), which automatically registers the RAM block for migration with a sensible name.

This patchset is a cross-version migration compatibility break for the boards "palmetto-bmc", "ast2500-evb", "romulus-bmc", "highbank" and "midway". We don't promise migration compat for those boards, so this is OK.

NB: I haven't tested this code beyond "does make check pass", because I don't have a test image for any of these boards. Testing welcomed :-)

thanks
-- PMM

Peter Maydell (3):
hw/arm/highbank: don't make sysram 'nomigrate' hw/arm/aspeed: don't make 'boot_rom' region 'nomigrate' hw/arm/aspeed_soc: don't use vmstate_register_ram_global for SRAM

 hw/arm/aspeed.c     | 2 +-
 hw/arm/aspeed_soc.c | 3 +--
 hw/arm/highbank.c   | 2 +-
 3 files changed, 3 insertions(+), 4 deletions(-)
Signature · 1 line
2.17.0