]> git.proxmox.com Git - mirror_qemu.git/commit
hw/arm/aspeed_soc: don't use vmstate_register_ram_global for SRAM
authorPeter Maydell <peter.maydell@linaro.org>
Thu, 26 Apr 2018 10:04:39 +0000 (11:04 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 26 Apr 2018 10:04:39 +0000 (11:04 +0100)
commita2e9989c96aaa0e0d993e7b44eb6c2da2f9214ac
tree09993a3010463140acede0f9b052a49e4a662020
parent44cf837d38c3af178711781ffdc61776763e40d1
hw/arm/aspeed_soc: don't use vmstate_register_ram_global for SRAM

Currently we use vmstate_register_ram_global() for the SRAM;
this is not a good idea for devices, because it means that
you can only ever create one instance of the device, as
the second instance would get a RAM block name clash.
Instead, use memory_region_init_ram(), which automatically
registers the RAM block with a local-to-the-device name.

Note that this would be a cross-version migration compatibility break
for the "palmetto-bmc", "ast2500-evb" and "romulus-bmc" machines,
but migration is currently broken for them.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Tested-by: Cédric Le Goater <clg@kaod.org>
Message-id: 20180420124835.7268-4-peter.maydell@linaro.org
hw/arm/aspeed_soc.c