All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/2] mips boston/malta: don't have nomigrate RAM regions
@ 2018-06-04 11:03 Peter Maydell
  2018-06-04 11:03 ` [Qemu-devel] [PATCH 1/2] hw/mips/boston: don't make flash region 'nomigrate' Peter Maydell
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Peter Maydell @ 2018-06-04 11:03 UTC (permalink / raw)
  To: qemu-devel
  Cc: patches, Paul Burton, Aurelien Jarno, Yongbok Kim,
	Cédric Le Goater, Juan Quintela, dgilbert

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(-)

-- 
2.17.1

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Qemu-devel] [PATCH 1/2] hw/mips/boston: don't make flash region 'nomigrate'
  2018-06-04 11:03 [Qemu-devel] [PATCH 0/2] mips boston/malta: don't have nomigrate RAM regions Peter Maydell
@ 2018-06-04 11:03 ` Peter Maydell
  2018-06-04 13:21   ` Cédric Le Goater
  2018-06-04 14:02   ` Philippe Mathieu-Daudé
  2018-06-04 11:03 ` [Qemu-devel] [PATCH 2/2] hw/mips/mips_malta: don't make bios " Peter Maydell
  2018-06-15 10:08 ` [Qemu-devel] [PATCH 0/2] mips boston/malta: don't have nomigrate RAM regions Peter Maydell
  2 siblings, 2 replies; 9+ messages in thread
From: Peter Maydell @ 2018-06-04 11:03 UTC (permalink / raw)
  To: qemu-devel
  Cc: patches, Paul Burton, Aurelien Jarno, Yongbok Kim,
	Cédric Le Goater, Juan Quintela, dgilbert

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.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 hw/mips/boston.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/hw/mips/boston.c b/hw/mips/boston.c
index 5302e5c885..1d136529ad 100644
--- a/hw/mips/boston.c
+++ b/hw/mips/boston.c
@@ -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);
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Qemu-devel] [PATCH 2/2] hw/mips/mips_malta: don't make bios region 'nomigrate'
  2018-06-04 11:03 [Qemu-devel] [PATCH 0/2] mips boston/malta: don't have nomigrate RAM regions Peter Maydell
  2018-06-04 11:03 ` [Qemu-devel] [PATCH 1/2] hw/mips/boston: don't make flash region 'nomigrate' Peter Maydell
@ 2018-06-04 11:03 ` Peter Maydell
  2018-06-04 13:21   ` Cédric Le Goater
  2018-06-04 14:02   ` Philippe Mathieu-Daudé
  2018-06-15 10:08 ` [Qemu-devel] [PATCH 0/2] mips boston/malta: don't have nomigrate RAM regions Peter Maydell
  2 siblings, 2 replies; 9+ messages in thread
From: Peter Maydell @ 2018-06-04 11:03 UTC (permalink / raw)
  To: qemu-devel
  Cc: patches, Paul Burton, Aurelien Jarno, Yongbok Kim,
	Cédric Le Goater, Juan Quintela, dgilbert

Currently 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.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 hw/mips/mips_malta.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c
index af70ecffc0..927944899b 100644
--- a/hw/mips/mips_malta.c
+++ b/hw/mips/mips_malta.c
@@ -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)) {
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [Qemu-devel] [PATCH 2/2] hw/mips/mips_malta: don't make bios region 'nomigrate'
  2018-06-04 11:03 ` [Qemu-devel] [PATCH 2/2] hw/mips/mips_malta: don't make bios " Peter Maydell
@ 2018-06-04 13:21   ` Cédric Le Goater
  2018-06-04 14:02   ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 9+ messages in thread
From: Cédric Le Goater @ 2018-06-04 13:21 UTC (permalink / raw)
  To: Peter Maydell, qemu-devel
  Cc: patches, Paul Burton, Aurelien Jarno, Yongbok Kim, Juan Quintela,
	dgilbert

On 06/04/2018 01:03 PM, Peter Maydell wrote:
> Currently 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.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Reviewed-by: Cédric Le Goater <clg@kaod.org>

Thanks,

C.

> ---
>  hw/mips/mips_malta.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c
> index af70ecffc0..927944899b 100644
> --- a/hw/mips/mips_malta.c
> +++ b/hw/mips/mips_malta.c
> @@ -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)) {
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Qemu-devel] [PATCH 1/2] hw/mips/boston: don't make flash region 'nomigrate'
  2018-06-04 11:03 ` [Qemu-devel] [PATCH 1/2] hw/mips/boston: don't make flash region 'nomigrate' Peter Maydell
@ 2018-06-04 13:21   ` Cédric Le Goater
  2018-06-04 14:02   ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 9+ messages in thread
From: Cédric Le Goater @ 2018-06-04 13:21 UTC (permalink / raw)
  To: Peter Maydell, qemu-devel
  Cc: patches, Paul Burton, Aurelien Jarno, Yongbok Kim, Juan Quintela,
	dgilbert

On 06/04/2018 01:03 PM, Peter Maydell wrote:
> 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.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Reviewed-by: Cédric Le Goater <clg@kaod.org>

Thanks,

C.

> ---
>  hw/mips/boston.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/hw/mips/boston.c b/hw/mips/boston.c
> index 5302e5c885..1d136529ad 100644
> --- a/hw/mips/boston.c
> +++ b/hw/mips/boston.c
> @@ -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);
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Qemu-devel] [PATCH 1/2] hw/mips/boston: don't make flash region 'nomigrate'
  2018-06-04 11:03 ` [Qemu-devel] [PATCH 1/2] hw/mips/boston: don't make flash region 'nomigrate' Peter Maydell
  2018-06-04 13:21   ` Cédric Le Goater
@ 2018-06-04 14:02   ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-06-04 14:02 UTC (permalink / raw)
  To: Peter Maydell, qemu-devel
  Cc: Juan Quintela, patches, dgilbert, Paul Burton,
	Cédric Le Goater, Yongbok Kim, Aurelien Jarno

On 06/04/2018 08:03 AM, Peter Maydell wrote:
> 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.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

> ---
>  hw/mips/boston.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/hw/mips/boston.c b/hw/mips/boston.c
> index 5302e5c885..1d136529ad 100644
> --- a/hw/mips/boston.c
> +++ b/hw/mips/boston.c
> @@ -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);
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Qemu-devel] [PATCH 2/2] hw/mips/mips_malta: don't make bios region 'nomigrate'
  2018-06-04 11:03 ` [Qemu-devel] [PATCH 2/2] hw/mips/mips_malta: don't make bios " Peter Maydell
  2018-06-04 13:21   ` Cédric Le Goater
@ 2018-06-04 14:02   ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-06-04 14:02 UTC (permalink / raw)
  To: Peter Maydell, qemu-devel
  Cc: Juan Quintela, patches, dgilbert, Paul Burton,
	Cédric Le Goater, Yongbok Kim, Aurelien Jarno

On 06/04/2018 08:03 AM, Peter Maydell wrote:
> Currently 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.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

> ---
>  hw/mips/mips_malta.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c
> index af70ecffc0..927944899b 100644
> --- a/hw/mips/mips_malta.c
> +++ b/hw/mips/mips_malta.c
> @@ -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)) {
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Qemu-devel] [PATCH 0/2] mips boston/malta: don't have nomigrate RAM regions
  2018-06-04 11:03 [Qemu-devel] [PATCH 0/2] mips boston/malta: don't have nomigrate RAM regions Peter Maydell
  2018-06-04 11:03 ` [Qemu-devel] [PATCH 1/2] hw/mips/boston: don't make flash region 'nomigrate' Peter Maydell
  2018-06-04 11:03 ` [Qemu-devel] [PATCH 2/2] hw/mips/mips_malta: don't make bios " Peter Maydell
@ 2018-06-15 10:08 ` Peter Maydell
  2018-06-15 17:14   ` Paul Burton
  2 siblings, 1 reply; 9+ messages in thread
From: Peter Maydell @ 2018-06-15 10:08 UTC (permalink / raw)
  To: QEMU Developers
  Cc: Juan Quintela, patches, Dr. David Alan Gilbert, Paul Burton,
	Cédric Le Goater, Yongbok Kim, Aurelien Jarno

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Qemu-devel] [PATCH 0/2] mips boston/malta: don't have nomigrate RAM regions
  2018-06-15 10:08 ` [Qemu-devel] [PATCH 0/2] mips boston/malta: don't have nomigrate RAM regions Peter Maydell
@ 2018-06-15 17:14   ` Paul Burton
  0 siblings, 0 replies; 9+ messages in thread
From: Paul Burton @ 2018-06-15 17:14 UTC (permalink / raw)
  To: Peter Maydell
  Cc: QEMU Developers, Juan Quintela, patches, Dr. David Alan Gilbert,
	Cédric Le Goater, Yongbok Kim, Aurelien Jarno

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-06-15 17:15 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-04 11:03 [Qemu-devel] [PATCH 0/2] mips boston/malta: don't have nomigrate RAM regions Peter Maydell
2018-06-04 11:03 ` [Qemu-devel] [PATCH 1/2] hw/mips/boston: don't make flash region 'nomigrate' Peter Maydell
2018-06-04 13:21   ` Cédric Le Goater
2018-06-04 14:02   ` Philippe Mathieu-Daudé
2018-06-04 11:03 ` [Qemu-devel] [PATCH 2/2] hw/mips/mips_malta: don't make bios " Peter Maydell
2018-06-04 13:21   ` Cédric Le Goater
2018-06-04 14:02   ` Philippe Mathieu-Daudé
2018-06-15 10:08 ` [Qemu-devel] [PATCH 0/2] mips boston/malta: don't have nomigrate RAM regions Peter Maydell
2018-06-15 17:14   ` Paul Burton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.