mips boston/malta: don't have nomigrate RAM regions
cover mips boston/malta: don't have nomigrate RAM regions
This patchset fixes a a bug in the MIPS boston and malta boards:
they currently use memory_region_init_rom_nomigrate() to create memory regions for their BIOS/flash, and they don't manually register the MR with vmstate_register_ram() either. This currently means that its contents are migrated, but as a RAM block whose name is the empty string; in future (when a patch which is currently in the outstanding migration tree pull request hits master) it will mean they are not migrated at all. Switch to using memory_region_init_ram() instead, so the memory contents are migrated with a reasonable name.
Note that this is a cross-version migration compatibility break for both machines, but:
(a) migration will break anyway due to the "don't migrate unnamed RAM blocks" patch
(b) neither machine is versioned, so we don't really care about maintaining cross-version migration compatibility AFAIK
thanks
-- PMM
Peter Maydell (2):
hw/mips/boston: don't make flash region 'nomigrate' hw/mips/mips_malta: don't make bios region 'nomigrate'
hw/mips/boston.c | 3 +-- hw/mips/mips_malta.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-)
Signature · 1 line
2.17.1
PATCH 1/2 hw/mips/boston: don't make flash region 'nomigrate'
Currently we use memory_region_init_rom_nomigrate() to create the "boston.flash" memory region, and we don't manually register it with vmstate_register_ram(). This currently means that its contents are migrated but as a ram block whose name is the empty string; in future it may mean they are not migrated at all. Use memory_region_init_ram() instead.
Note that this is a a cross-version migration compatibility break for the "boston" machine.
--- hw/mips/boston.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
hw/mips/boston.c +1 -2
@@ -471,8 +471,7 @@ static void boston_mach_init(MachineState *machine)sysbus_mmio_map_overlap (SYS_BUS_DEVICE (s->cps),0 ,0 ,1 ); flash =g_new (MemoryRegion,1 ); -memory_region_init_rom_nomigrate (flash,NULL , -"boston.flash" ,128 *M_BYTE , &err); +memory_region_init_rom (flash,NULL ,"boston.flash" ,128 *M_BYTE , &err);memory_region_add_subregion_overlap (sys_mem,0x18000000 , flash,0 ); ddr =g_new (MemoryRegion,1 );
Signature · 1 line
2.17.1
Re: [Qemu-devel] [PATCH 1/2] hw/mips/boston: don't make flash region 'nomigrate'
Quoted 11 lines · Peter Maydell
Currently we use
memory_region_init_rom_nomigrate()to create the "boston.flash" memory region, and we don't manually register it withvmstate_register_ram(). This currently means that its contents are migrated but as a ram block whose name is the empty string; in future it may mean they are not migrated at all. Usememory_region_init_ram()instead.Note that this is a a cross-version migration compatibility break for the "boston" machine.
Signed-off-by Peter Maydell <[email protected]>
Thanks,
C.
Quoted 19 lines
--- hw/mips/boston.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)hw/mips/boston.c +1
-2@@ -471,8 +471,7 @@ static void boston_mach_init(MachineState *machine)sysbus_mmio_map_overlap (SYS_BUS_DEVICE (s->cps),0 ,0 ,1 ); flash =g_new (MemoryRegion,1 ); -memory_region_init_rom_nomigrate (flash,NULL , -"boston.flash" ,128 *M_BYTE , &err); +memory_region_init_rom (flash,NULL ,"boston.flash" ,128 *M_BYTE , &err);memory_region_add_subregion_overlap (sys_mem,0x18000000 , flash,0 ); ddr =g_new (MemoryRegion,1 );
Re: [Qemu-devel] [PATCH 1/2] hw/mips/boston: don't make flash region 'nomigrate'
In reply to Peter MaydellQuoted 11 lines · Peter Maydell
Currently we use
memory_region_init_rom_nomigrate()to create the "boston.flash" memory region, and we don't manually register it withvmstate_register_ram(). This currently means that its contents are migrated but as a ram block whose name is the empty string; in future it may mean they are not migrated at all. Usememory_region_init_ram()instead.Note that this is a a cross-version migration compatibility break for the "boston" machine.
Signed-off-by Peter Maydell <[email protected]>
Quoted 19 lines
--- hw/mips/boston.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)hw/mips/boston.c +1
-2@@ -471,8 +471,7 @@ static void boston_mach_init(MachineState *machine)sysbus_mmio_map_overlap (SYS_BUS_DEVICE (s->cps),0 ,0 ,1 ); flash =g_new (MemoryRegion,1 ); -memory_region_init_rom_nomigrate (flash,NULL , -"boston.flash" ,128 *M_BYTE , &err); +memory_region_init_rom (flash,NULL ,"boston.flash" ,128 *M_BYTE , &err);memory_region_add_subregion_overlap (sys_mem,0x18000000 , flash,0 ); ddr =g_new (MemoryRegion,1 );
PATCH 2/2 hw/mips/mips_malta: don't make bios region 'nomigrate'
In reply to Peter MaydellCurrently we use memory_region_init_rom_nomigrate() to create the "bios.1fc" memory region, and we don't manually register it with vmstate_register_ram(). This currently means that its contents are migrated but as a ram block whose name is the empty string; in future it may mean they are not migrated at all. Use memory_region_init_ram() instead.
Note that this is a a cross-version migration compatibility break for the "malta" machine.
--- hw/mips/mips_malta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/mips/mips_malta.c +1 -1
@@ -1153,7 +1153,7 @@ void mips_malta_init(MachineState *machine)* handled by an overlapping region as the resulting ROM code subpage * regions are not executable. */ -memory_region_init_ram_nomigrate (bios_copy,NULL ,"bios.1fc" ,BIOS_SIZE , +memory_region_init_ram (bios_copy,NULL ,"bios.1fc" ,BIOS_SIZE , &error_fatal);if (!rom_copy (memory_region_get_ram_ptr (bios_copy),FLASH_ADDRESS ,BIOS_SIZE )) {
Signature · 1 line
2.17.1
Re: [Qemu-devel] [PATCH 2/2] hw/mips/mips_malta: don't make bios region 'nomigrate'
Quoted 11 lines · Peter Maydell
Currently we use
memory_region_init_rom_nomigrate()to create the "bios.1fc" memory region, and we don't manually register it withvmstate_register_ram(). This currently means that its contents are migrated but as a ram block whose name is the empty string; in future it may mean they are not migrated at all. Usememory_region_init_ram()instead.Note that this is a a cross-version migration compatibility break for the "malta" machine.
Signed-off-by Peter Maydell <[email protected]>
Thanks,
C.
Quoted 18 lines
--- hw/mips/mips_malta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/mips/mips_malta.c +1
-1@@ -1153,7 +1153,7 @@ void mips_malta_init(MachineState *machine)* handled by an overlapping region as the resulting ROM code subpage * regions are not executable. */ -memory_region_init_ram_nomigrate (bios_copy,NULL ,"bios.1fc" ,BIOS_SIZE , +memory_region_init_ram (bios_copy,NULL ,"bios.1fc" ,BIOS_SIZE , &error_fatal);if (!rom_copy (memory_region_get_ram_ptr (bios_copy),FLASH_ADDRESS ,BIOS_SIZE )) {
Re: [Qemu-devel] [PATCH 2/2] hw/mips/mips_malta: don't make bios region 'nomigrate'
In reply to Peter MaydellQuoted 11 lines · Peter Maydell
Currently we use
memory_region_init_rom_nomigrate()to create the "bios.1fc" memory region, and we don't manually register it withvmstate_register_ram(). This currently means that its contents are migrated but as a ram block whose name is the empty string; in future it may mean they are not migrated at all. Usememory_region_init_ram()instead.Note that this is a a cross-version migration compatibility break for the "malta" machine.
Signed-off-by Peter Maydell <[email protected]>
Quoted 18 lines
--- hw/mips/mips_malta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/mips/mips_malta.c +1
-1@@ -1153,7 +1153,7 @@ void mips_malta_init(MachineState *machine)* handled by an overlapping region as the resulting ROM code subpage * regions are not executable. */ -memory_region_init_ram_nomigrate (bios_copy,NULL ,"bios.1fc" ,BIOS_SIZE , +memory_region_init_ram (bios_copy,NULL ,"bios.1fc" ,BIOS_SIZE , &error_fatal);if (!rom_copy (memory_region_get_ram_ptr (bios_copy),FLASH_ADDRESS ,BIOS_SIZE )) {
Quoted 11 lines · Peter Maydell
This patchset fixes a a bug in the MIPS boston and malta boards:
they currently usememory_region_init_rom_nomigrate()to create memory regions for their BIOS/flash, and they don't manually register the MR withvmstate_register_ram()either. This currently means that its contents are migrated, but as a RAM block whose name is the empty string; in future (when a patch which is currently in the outstanding migration tree pull request hits master) it will mean they are not migrated at all. Switch to usingmemory_region_init_ram()instead, so the memory contents are migrated with a reasonable name.
Quoted 6 lines
Note that this is a cross-version migration compatibility break for both machines, but:
(a) migration will break anyway due to the "don't migrate unnamed RAM blocks" patch
(b) neither machine is versioned, so we don't really care about maintaining cross-version migration compatibility AFAIK
Any comment from the MIPS maintainers?
thanks
-- PMM
Paul Burton
Reviewed-byHi Peter,
Quoted 19 lines · Peter Maydell
Quoted 11 lines · Peter Maydell
This patchset fixes a a bug in the MIPS boston and malta boards:
they currently usememory_region_init_rom_nomigrate()to create memory regions for their BIOS/flash, and they don't manually register the MR withvmstate_register_ram()either. This currently means that its contents are migrated, but as a RAM block whose name is the empty string; in future (when a patch which is currently in the outstanding migration tree pull request hits master) it will mean they are not migrated at all. Switch to usingmemory_region_init_ram()instead, so the memory contents are migrated with a reasonable name.Quoted 6 lines
Note that this is a cross-version migration compatibility break for both machines, but:
(a) migration will break anyway due to the "don't migrate unnamed RAM blocks" patch
(b) neither machine is versioned, so we don't really care about maintaining cross-version migration compatibility AFAIK
Quoted 4 lines
Any comment from the MIPS maintainers?
thanks
-- PMM
FWIW, this looks fine to me for both Boston & Malta:
Thanks,
Paul