hw/net/dp8393x: don't make prom region 'nomigrate'
PATCH 1/1 hw/net/dp8393x: don't make prom region 'nomigrate'
Currently we use memory_region_init_rom_nomigrate() to create the "dp3893x-prom" 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 MIPS "magnum" and "pica61" machines.
---
This is I think the last device that creates a RAM memory region and never registers it for migration. Only used on the MIPS 'jazz' boards.
hw/net/dp8393x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/net/dp8393x.c +1 -1
@@ -887,7 +887,7 @@ static void dp8393x_realize(DeviceState *dev, Error **errp) s->watchdog =timer_new_ns (QEMU_CLOCK_VIRTUAL , dp8393x_watchdog, s); s->regs[SONIC_SR ] =0x0004 ;/* only revision recognized by Linux */ -memory_region_init_ram_nomigrate (&s->prom,OBJECT (dev), +memory_region_init_ram (&s->prom,OBJECT (dev),"dp8393x-prom" ,SONIC_PROM_SIZE , &local_err);if (local_err) {error_propagate (errp, local_err);
Signature · 1 line
2.17.1
Quoted 10 lines
Currently we use
memory_region_init_rom_nomigrate()to create the "dp3893x-prom" 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 MIPS "magnum" and "pica61" machines.
As far as MIPS jazz ("magnum" and "pica61") boards are concerned:
Quoted 8 lines
Signed-off-by Peter Maydell <[email protected]>---
This is I think the last device that creates a RAM memory region and never registers it for migration. Only used on the MIPS 'jazz' boards.hw/net/dp8393x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 7 lines · Aleksandar Markovic
Quoted 7 lines
Currently we use
memory_region_init_rom_nomigrate()to create the "dp3893x-prom" 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.
Quoted 7 lines
Quoted 3 lines
Note that this is a a cross-version migration compatibility break for the MIPS "magnum" and "pica61" machines.
As far as MIPS jazz ("magnum" and "pica61") boards are concerned:
Reviewed-by Aleksandar Markovic <[email protected]>
Thanks for the review. I'll put this in via target-arm.next, just for convenience's sake, since I'm doing a pull request this afternoon anyway.
-- PMM