qemu-arm
[Top][All Lists]
Advanced

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

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


From: Peter Maydell
Subject: [Qemu-arm] [PATCH 0/3] aspeed, highbank: fix RAM migration oddities
Date: Fri, 20 Apr 2018 13:48:32 +0100

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(-)

-- 
2.17.0




reply via email to

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