mbox series

[0/2] mips boston/malta: don't have nomigrate RAM regions

Message ID 20180604110358.2821-1-peter.maydell@linaro.org
Headers show
Series mips boston/malta: don't have nomigrate RAM regions | expand

Message

Peter Maydell June 4, 2018, 11:03 a.m. UTC
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(-)

Comments

Peter Maydell June 15, 2018, 10:08 a.m. UTC | #1
On 4 June 2018 at 12:03, Peter Maydell <peter.maydell@linaro.org> wrote:
> 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

Any comment from the MIPS maintainers?

thanks
-- PMM
Paul Burton June 15, 2018, 5:14 p.m. UTC | #2
Hi Peter,

On Fri, Jun 15, 2018 at 11:08:11AM +0100, Peter Maydell wrote:
> On 4 June 2018 at 12:03, Peter Maydell <peter.maydell@linaro.org> wrote:
> > 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
> 
> Any comment from the MIPS maintainers?
> 
> thanks
> -- PMM

FWIW, this looks fine to me for both Boston & Malta:

    Reviewed-by: Paul Burton <paul.burton@mips.com>

Thanks,
    Paul