Even if we do not register newly created RAM MemoryRegion for migration with
vmstate_register_ram_global() function, ram_save_live() still saves this region
to snapshot file with empty idstr=="". Consequently this results in error during
VM restoration in ram_load().
Register chipid_mem and rom_mem for migration to avoid this problem.

Signed-off-by: Igor Mitsyanko <i.mitsya...@samsung.com>
---
 hw/exynos4210.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/hw/exynos4210.c b/hw/exynos4210.c
index a3a06f7..94d2e41 100644
--- a/hw/exynos4210.c
+++ b/hw/exynos4210.c
@@ -201,6 +201,7 @@ Exynos4210State *exynos4210_init(MemoryRegion *system_mem,
     memory_region_init_ram_ptr(&s->chipid_mem, "exynos4210.chipid",
             sizeof(chipid_and_omr), chipid_and_omr);
     memory_region_set_readonly(&s->chipid_mem, true);
+    vmstate_register_ram_global(&s->chipid_mem);
     memory_region_add_subregion(system_mem, EXYNOS4210_CHIPID_ADDR,
                                 &s->chipid_mem);
 
@@ -208,6 +209,7 @@ Exynos4210State *exynos4210_init(MemoryRegion *system_mem,
     memory_region_init_ram(&s->irom_mem, "exynos4210.irom",
                            EXYNOS4210_IROM_SIZE);
     memory_region_set_readonly(&s->irom_mem, true);
+    vmstate_register_ram_global(&s->irom_mem);
     memory_region_add_subregion(system_mem, EXYNOS4210_IROM_BASE_ADDR,
                                 &s->irom_mem);
     /* mirror of iROM */
-- 
1.7.4.1


Reply via email to