diff mbox series

[18/21] hw/mips: Let the machine be the owner of the system memory

Message ID 20191020225650.3671-19-philmd@redhat.com
State New
Headers show
Series hw: Let the machine be the owner of the system memory | expand

Commit Message

Philippe Mathieu-Daudé Oct. 20, 2019, 10:56 p.m. UTC
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 hw/mips/boston.c        | 2 +-
 hw/mips/mips_fulong2e.c | 3 ++-
 hw/mips/mips_jazz.c     | 2 +-
 hw/mips/mips_malta.c    | 2 +-
 hw/mips/mips_mipssim.c  | 2 +-
 hw/mips/mips_r4k.c      | 3 ++-
 6 files changed, 8 insertions(+), 6 deletions(-)

Comments

Aleksandar Markovic Oct. 21, 2019, 6:25 a.m. UTC | #1
On Monday, October 21, 2019, Philippe Mathieu-Daudé <philmd@redhat.com>
wrote:

> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  hw/mips/boston.c        | 2 +-
>  hw/mips/mips_fulong2e.c | 3 ++-
>  hw/mips/mips_jazz.c     | 2 +-
>  hw/mips/mips_malta.c    | 2 +-
>  hw/mips/mips_mipssim.c  | 2 +-
>  hw/mips/mips_r4k.c      | 3 ++-
>  6 files changed, 8 insertions(+), 6 deletions(-)
>
>
Philippe, can this patch be applied independently (on other patches of this
series)?

Thanks,
A.




> diff --git a/hw/mips/boston.c b/hw/mips/boston.c
> index ca7d813a52..8445fee0f1 100644
> --- a/hw/mips/boston.c
> +++ b/hw/mips/boston.c
> @@ -474,7 +474,7 @@ static void boston_mach_init(MachineState *machine)
>      memory_region_add_subregion_overlap(sys_mem, 0x18000000, flash, 0);
>
>      ddr = g_new(MemoryRegion, 1);
> -    memory_region_allocate_system_memory(ddr, NULL, "boston.ddr",
> +    memory_region_allocate_system_memory(ddr, machine, "boston.ddr",
>                                           machine->ram_size);
>      memory_region_add_subregion_overlap(sys_mem, 0x80000000, ddr, 0);
>
> diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c
> index cf537dd7e6..d5a5cef619 100644
> --- a/hw/mips/mips_fulong2e.c
> +++ b/hw/mips/mips_fulong2e.c
> @@ -318,7 +318,8 @@ static void mips_fulong2e_init(MachineState *machine)
>      ram_size = 256 * MiB;
>
>      /* allocate RAM */
> -    memory_region_allocate_system_memory(ram, NULL, "fulong2e.ram",
> ram_size);
> +    memory_region_allocate_system_memory(ram, machine,
> +                                         "fulong2e.ram", ram_size);
>      memory_region_init_ram(bios, NULL, "fulong2e.bios", BIOS_SIZE,
>                             &error_fatal);
>      memory_region_set_readonly(bios, true);
> diff --git a/hw/mips/mips_jazz.c b/hw/mips/mips_jazz.c
> index 8d010a0b6e..88b125855f 100644
> --- a/hw/mips/mips_jazz.c
> +++ b/hw/mips/mips_jazz.c
> @@ -188,7 +188,7 @@ static void mips_jazz_init(MachineState *machine,
>      cc->do_transaction_failed = mips_jazz_do_transaction_failed;
>
>      /* allocate RAM */
> -    memory_region_allocate_system_memory(ram, NULL, "mips_jazz.ram",
> +    memory_region_allocate_system_memory(ram, machine, "mips_jazz.ram",
>                                           machine->ram_size);
>      memory_region_add_subregion(address_space, 0, ram);
>
> diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c
> index 4d9c64b36a..af56a29ccb 100644
> --- a/hw/mips/mips_malta.c
> +++ b/hw/mips/mips_malta.c
> @@ -1267,7 +1267,7 @@ void mips_malta_init(MachineState *machine)
>      }
>
>      /* register RAM at high address where it is undisturbed by IO */
> -    memory_region_allocate_system_memory(ram_high, NULL,
> "mips_malta.ram",
> +    memory_region_allocate_system_memory(ram_high, machine,
> "mips_malta.ram",
>                                           ram_size);
>      memory_region_add_subregion(system_memory, 0x80000000, ram_high);
>
> diff --git a/hw/mips/mips_mipssim.c b/hw/mips/mips_mipssim.c
> index 282bbecb24..c1933231e2 100644
> --- a/hw/mips/mips_mipssim.c
> +++ b/hw/mips/mips_mipssim.c
> @@ -166,7 +166,7 @@ mips_mipssim_init(MachineState *machine)
>      qemu_register_reset(main_cpu_reset, reset_info);
>
>      /* Allocate RAM. */
> -    memory_region_allocate_system_memory(ram, NULL, "mips_mipssim.ram",
> +    memory_region_allocate_system_memory(ram, machine,
> "mips_mipssim.ram",
>                                           ram_size);
>      memory_region_init_ram(bios, NULL, "mips_mipssim.bios", BIOS_SIZE,
>                             &error_fatal);
> diff --git a/hw/mips/mips_r4k.c b/hw/mips/mips_r4k.c
> index bc0be26544..59f8cacfb6 100644
> --- a/hw/mips/mips_r4k.c
> +++ b/hw/mips/mips_r4k.c
> @@ -203,7 +203,8 @@ void mips_r4k_init(MachineState *machine)
>                       " maximum 256MB", ram_size / MiB);
>          exit(1);
>      }
> -    memory_region_allocate_system_memory(ram, NULL, "mips_r4k.ram",
> ram_size);
> +    memory_region_allocate_system_memory(ram, machine, "mips_r4k.ram",
> +                                         ram_size);
>
>      memory_region_add_subregion(address_space_mem, 0, ram);
>
> --
> 2.21.0
>
>
>
Philippe Mathieu-Daudé Oct. 21, 2019, 8:34 a.m. UTC | #2
Hi Aleksandar,

On 10/21/19 8:25 AM, Aleksandar Markovic wrote:
> 
> 
> On Monday, October 21, 2019, Philippe Mathieu-Daudé <philmd@redhat.com 
> <mailto:philmd@redhat.com>> wrote:
> 
>     Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com
>     <mailto:philmd@redhat.com>>
>     ---
>       hw/mips/boston.c        | 2 +-
>       hw/mips/mips_fulong2e.c | 3 ++-
>       hw/mips/mips_jazz.c     | 2 +-
>       hw/mips/mips_malta.c    | 2 +-
>       hw/mips/mips_mipssim.c  | 2 +-
>       hw/mips/mips_r4k.c      | 3 ++-
>       6 files changed, 8 insertions(+), 6 deletions(-)
> 
> 
> Philippe, can this patch be applied independently (on other patches of 
> this series)?

Unfortunately not because patch #9 changed the prototype of
memory_region_allocate_system_memory() so this patch alone
won't build.

I rather expect this series goes as a whole via the machine-next
tree.

Do you mind giving your Acked-by tag to this patch?

Thanks,

Phil.

> 
> 
>     diff --git a/hw/mips/boston.c b/hw/mips/boston.c
>     index ca7d813a52..8445fee0f1 100644
>     --- a/hw/mips/boston.c
>     +++ b/hw/mips/boston.c
>     @@ -474,7 +474,7 @@ static void boston_mach_init(MachineState *machine)
>           memory_region_add_subregion_overlap(sys_mem, 0x18000000,
>     flash, 0);
> 
>           ddr = g_new(MemoryRegion, 1);
>     -    memory_region_allocate_system_memory(ddr, NULL, "boston.ddr",
>     +    memory_region_allocate_system_memory(ddr, machine, "boston.ddr",
>                                                machine->ram_size);
>           memory_region_add_subregion_overlap(sys_mem, 0x80000000, ddr, 0);
> 
>     diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c
>     index cf537dd7e6..d5a5cef619 100644
>     --- a/hw/mips/mips_fulong2e.c
>     +++ b/hw/mips/mips_fulong2e.c
>     @@ -318,7 +318,8 @@ static void mips_fulong2e_init(MachineState
>     *machine)
>           ram_size = 256 * MiB;
> 
>           /* allocate RAM */
>     -    memory_region_allocate_system_memory(ram, NULL, "fulong2e.ram",
>     ram_size);
>     +    memory_region_allocate_system_memory(ram, machine,
>     +                                         "fulong2e.ram", ram_size);
>           memory_region_init_ram(bios, NULL, "fulong2e.bios", BIOS_SIZE,
>                                  &error_fatal);
>           memory_region_set_readonly(bios, true);
>     diff --git a/hw/mips/mips_jazz.c b/hw/mips/mips_jazz.c
>     index 8d010a0b6e..88b125855f 100644
>     --- a/hw/mips/mips_jazz.c
>     +++ b/hw/mips/mips_jazz.c
>     @@ -188,7 +188,7 @@ static void mips_jazz_init(MachineState *machine,
>           cc->do_transaction_failed = mips_jazz_do_transaction_failed;
> 
>           /* allocate RAM */
>     -    memory_region_allocate_system_memory(ram, NULL, "mips_jazz.ram",
>     +    memory_region_allocate_system_memory(ram, machine, "mips_jazz.ram",
>                                                machine->ram_size);
>           memory_region_add_subregion(address_space, 0, ram);
> 
>     diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c
>     index 4d9c64b36a..af56a29ccb 100644
>     --- a/hw/mips/mips_malta.c
>     +++ b/hw/mips/mips_malta.c
>     @@ -1267,7 +1267,7 @@ void mips_malta_init(MachineState *machine)
>           }
> 
>           /* register RAM at high address where it is undisturbed by IO */
>     -    memory_region_allocate_system_memory(ram_high, NULL,
>     "mips_malta.ram",
>     +    memory_region_allocate_system_memory(ram_high, machine,
>     "mips_malta.ram",
>                                                ram_size);
>           memory_region_add_subregion(system_memory, 0x80000000, ram_high);
> 
>     diff --git a/hw/mips/mips_mipssim.c b/hw/mips/mips_mipssim.c
>     index 282bbecb24..c1933231e2 100644
>     --- a/hw/mips/mips_mipssim.c
>     +++ b/hw/mips/mips_mipssim.c
>     @@ -166,7 +166,7 @@ mips_mipssim_init(MachineState *machine)
>           qemu_register_reset(main_cpu_reset, reset_info);
> 
>           /* Allocate RAM. */
>     -    memory_region_allocate_system_memory(ram, NULL, "mips_mipssim.ram",
>     +    memory_region_allocate_system_memory(ram, machine,
>     "mips_mipssim.ram",
>                                                ram_size);
>           memory_region_init_ram(bios, NULL, "mips_mipssim.bios", BIOS_SIZE,
>                                  &error_fatal);
>     diff --git a/hw/mips/mips_r4k.c b/hw/mips/mips_r4k.c
>     index bc0be26544..59f8cacfb6 100644
>     --- a/hw/mips/mips_r4k.c
>     +++ b/hw/mips/mips_r4k.c
>     @@ -203,7 +203,8 @@ void mips_r4k_init(MachineState *machine)
>                            " maximum 256MB", ram_size / MiB);
>               exit(1);
>           }
>     -    memory_region_allocate_system_memory(ram, NULL, "mips_r4k.ram",
>     ram_size);
>     +    memory_region_allocate_system_memory(ram, machine, "mips_r4k.ram",
>     +                                         ram_size);
> 
>           memory_region_add_subregion(address_space_mem, 0, ram);
> 
>     -- 
>     2.21.0
> 
>
Aleksandar Markovic Oct. 21, 2019, 10:56 a.m. UTC | #3
On Monday, October 21, 2019, Philippe Mathieu-Daudé <philmd@redhat.com>
wrote:

> Hi Aleksandar,
>
> On 10/21/19 8:25 AM, Aleksandar Markovic wrote:
>
>>
>>
>> On Monday, October 21, 2019, Philippe Mathieu-Daudé <philmd@redhat.com
>> <mailto:philmd@redhat.com>> wrote:
>>
>>     Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com
>>     <mailto:philmd@redhat.com>>
>>     ---
>>       hw/mips/boston.c        | 2 +-
>>       hw/mips/mips_fulong2e.c | 3 ++-
>>       hw/mips/mips_jazz.c     | 2 +-
>>       hw/mips/mips_malta.c    | 2 +-
>>       hw/mips/mips_mipssim.c  | 2 +-
>>       hw/mips/mips_r4k.c      | 3 ++-
>>       6 files changed, 8 insertions(+), 6 deletions(-)
>>
>>
>> Philippe, can this patch be applied independently (on other patches of
>> this series)?
>>
>
> Unfortunately not because patch #9 changed the prototype of
> memory_region_allocate_system_memory() so this patch alone
> won't build.
>
> I rather expect this series goes as a whole via the machine-next
> tree.
>
> Do you mind giving your Acked-by tag to this patch?
>
>
I can't, sorry, for MIPS target, we don't accept patches with empty commit
messages.

A.




> Thanks,
>
> Phil.
>
>
>>
>>     diff --git a/hw/mips/boston.c b/hw/mips/boston.c
>>     index ca7d813a52..8445fee0f1 100644
>>     --- a/hw/mips/boston.c
>>     +++ b/hw/mips/boston.c
>>     @@ -474,7 +474,7 @@ static void boston_mach_init(MachineState
>> *machine)
>>           memory_region_add_subregion_overlap(sys_mem, 0x18000000,
>>     flash, 0);
>>
>>           ddr = g_new(MemoryRegion, 1);
>>     -    memory_region_allocate_system_memory(ddr, NULL, "boston.ddr",
>>     +    memory_region_allocate_system_memory(ddr, machine, "boston.ddr",
>>                                                machine->ram_size);
>>           memory_region_add_subregion_overlap(sys_mem, 0x80000000, ddr,
>> 0);
>>
>>     diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c
>>     index cf537dd7e6..d5a5cef619 100644
>>     --- a/hw/mips/mips_fulong2e.c
>>     +++ b/hw/mips/mips_fulong2e.c
>>     @@ -318,7 +318,8 @@ static void mips_fulong2e_init(MachineState
>>     *machine)
>>           ram_size = 256 * MiB;
>>
>>           /* allocate RAM */
>>     -    memory_region_allocate_system_memory(ram, NULL, "fulong2e.ram",
>>     ram_size);
>>     +    memory_region_allocate_system_memory(ram, machine,
>>     +                                         "fulong2e.ram", ram_size);
>>           memory_region_init_ram(bios, NULL, "fulong2e.bios", BIOS_SIZE,
>>                                  &error_fatal);
>>           memory_region_set_readonly(bios, true);
>>     diff --git a/hw/mips/mips_jazz.c b/hw/mips/mips_jazz.c
>>     index 8d010a0b6e..88b125855f 100644
>>     --- a/hw/mips/mips_jazz.c
>>     +++ b/hw/mips/mips_jazz.c
>>     @@ -188,7 +188,7 @@ static void mips_jazz_init(MachineState *machine,
>>           cc->do_transaction_failed = mips_jazz_do_transaction_failed;
>>
>>           /* allocate RAM */
>>     -    memory_region_allocate_system_memory(ram, NULL, "mips_jazz.ram",
>>     +    memory_region_allocate_system_memory(ram, machine,
>> "mips_jazz.ram",
>>                                                machine->ram_size);
>>           memory_region_add_subregion(address_space, 0, ram);
>>
>>     diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c
>>     index 4d9c64b36a..af56a29ccb 100644
>>     --- a/hw/mips/mips_malta.c
>>     +++ b/hw/mips/mips_malta.c
>>     @@ -1267,7 +1267,7 @@ void mips_malta_init(MachineState *machine)
>>           }
>>
>>           /* register RAM at high address where it is undisturbed by IO */
>>     -    memory_region_allocate_system_memory(ram_high, NULL,
>>     "mips_malta.ram",
>>     +    memory_region_allocate_system_memory(ram_high, machine,
>>     "mips_malta.ram",
>>                                                ram_size);
>>           memory_region_add_subregion(system_memory, 0x80000000,
>> ram_high);
>>
>>     diff --git a/hw/mips/mips_mipssim.c b/hw/mips/mips_mipssim.c
>>     index 282bbecb24..c1933231e2 100644
>>     --- a/hw/mips/mips_mipssim.c
>>     +++ b/hw/mips/mips_mipssim.c
>>     @@ -166,7 +166,7 @@ mips_mipssim_init(MachineState *machine)
>>           qemu_register_reset(main_cpu_reset, reset_info);
>>
>>           /* Allocate RAM. */
>>     -    memory_region_allocate_system_memory(ram, NULL,
>> "mips_mipssim.ram",
>>     +    memory_region_allocate_system_memory(ram, machine,
>>     "mips_mipssim.ram",
>>                                                ram_size);
>>           memory_region_init_ram(bios, NULL, "mips_mipssim.bios",
>> BIOS_SIZE,
>>                                  &error_fatal);
>>     diff --git a/hw/mips/mips_r4k.c b/hw/mips/mips_r4k.c
>>     index bc0be26544..59f8cacfb6 100644
>>     --- a/hw/mips/mips_r4k.c
>>     +++ b/hw/mips/mips_r4k.c
>>     @@ -203,7 +203,8 @@ void mips_r4k_init(MachineState *machine)
>>                            " maximum 256MB", ram_size / MiB);
>>               exit(1);
>>           }
>>     -    memory_region_allocate_system_memory(ram, NULL, "mips_r4k.ram",
>>     ram_size);
>>     +    memory_region_allocate_system_memory(ram, machine,
>> "mips_r4k.ram",
>>     +                                         ram_size);
>>
>>           memory_region_add_subregion(address_space_mem, 0, ram);
>>
>>     --     2.21.0
>>
>>
>>
Philippe Mathieu-Daudé Oct. 21, 2019, 11:05 a.m. UTC | #4
On 10/21/19 12:56 PM, Aleksandar Markovic wrote:
> 
> 
> On Monday, October 21, 2019, Philippe Mathieu-Daudé <philmd@redhat.com 
> <mailto:philmd@redhat.com>> wrote:
> 
>     Hi Aleksandar,
> 
>     On 10/21/19 8:25 AM, Aleksandar Markovic wrote:
> 
> 
> 
>         On Monday, October 21, 2019, Philippe Mathieu-Daudé
>         <philmd@redhat.com <mailto:philmd@redhat.com>
>         <mailto:philmd@redhat.com <mailto:philmd@redhat.com>>> wrote:
> 
>              Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com
>         <mailto:philmd@redhat.com>
>              <mailto:philmd@redhat.com <mailto:philmd@redhat.com>>>
>              ---
>                hw/mips/boston.c        | 2 +-
>                hw/mips/mips_fulong2e.c | 3 ++-
>                hw/mips/mips_jazz.c     | 2 +-
>                hw/mips/mips_malta.c    | 2 +-
>                hw/mips/mips_mipssim.c  | 2 +-
>                hw/mips/mips_r4k.c      | 3 ++-
>                6 files changed, 8 insertions(+), 6 deletions(-)
> 
> 
>         Philippe, can this patch be applied independently (on other
>         patches of this series)?
> 
> 
>     Unfortunately not because patch #9 changed the prototype of
>     memory_region_allocate_system_memory() so this patch alone
>     won't build.
> 
>     I rather expect this series goes as a whole via the machine-next
>     tree.
> 
>     Do you mind giving your Acked-by tag to this patch?
> 
> 
> I can't, sorry, for MIPS target, we don't accept patches with empty 
> commit messages.

I see, I'v been wondering what to do, if simply repeating the patch 
subject or the cover, but since the series applies to all targets, this 
seems overkill. I think I'll simply repeat the subject then.

> 
> A.
> 
> 
>     Thanks,
> 
>     Phil.
> 
> 
> 
>              diff --git a/hw/mips/boston.c b/hw/mips/boston.c
>              index ca7d813a52..8445fee0f1 100644
>              --- a/hw/mips/boston.c
>              +++ b/hw/mips/boston.c
>              @@ -474,7 +474,7 @@ static void
>         boston_mach_init(MachineState *machine)
>                    memory_region_add_subregion_overlap(sys_mem, 0x18000000,
>              flash, 0);
> 
>                    ddr = g_new(MemoryRegion, 1);
>              -    memory_region_allocate_system_memory(ddr, NULL,
>         "boston.ddr",
>              +    memory_region_allocate_system_memory(ddr, machine,
>         "boston.ddr",
>                                                         machine->ram_size);
>                    memory_region_add_subregion_overlap(sys_mem,
>         0x80000000, ddr, 0);
> 
>              diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c
>              index cf537dd7e6..d5a5cef619 100644
>              --- a/hw/mips/mips_fulong2e.c
>              +++ b/hw/mips/mips_fulong2e.c
>              @@ -318,7 +318,8 @@ static void mips_fulong2e_init(MachineState
>              *machine)
>                    ram_size = 256 * MiB;
> 
>                    /* allocate RAM */
>              -    memory_region_allocate_system_memory(ram, NULL,
>         "fulong2e.ram",
>              ram_size);
>              +    memory_region_allocate_system_memory(ram, machine,
>              +                                         "fulong2e.ram",
>         ram_size);
>                    memory_region_init_ram(bios, NULL, "fulong2e.bios",
>         BIOS_SIZE,
>                                           &error_fatal);
>                    memory_region_set_readonly(bios, true);
>              diff --git a/hw/mips/mips_jazz.c b/hw/mips/mips_jazz.c
>              index 8d010a0b6e..88b125855f 100644
>              --- a/hw/mips/mips_jazz.c
>              +++ b/hw/mips/mips_jazz.c
>              @@ -188,7 +188,7 @@ static void mips_jazz_init(MachineState
>         *machine,
>                    cc->do_transaction_failed =
>         mips_jazz_do_transaction_failed;
> 
>                    /* allocate RAM */
>              -    memory_region_allocate_system_memory(ram, NULL,
>         "mips_jazz.ram",
>              +    memory_region_allocate_system_memory(ram, machine,
>         "mips_jazz.ram",
>                                                         machine->ram_size);
>                    memory_region_add_subregion(address_space, 0, ram);
> 
>              diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c
>              index 4d9c64b36a..af56a29ccb 100644
>              --- a/hw/mips/mips_malta.c
>              +++ b/hw/mips/mips_malta.c
>              @@ -1267,7 +1267,7 @@ void mips_malta_init(MachineState
>         *machine)
>                    }
> 
>                    /* register RAM at high address where it is
>         undisturbed by IO */
>              -    memory_region_allocate_system_memory(ram_high, NULL,
>              "mips_malta.ram",
>              +    memory_region_allocate_system_memory(ram_high, machine,
>              "mips_malta.ram",
>                                                         ram_size);
>                    memory_region_add_subregion(system_memory,
>         0x80000000, ram_high);
> 
>              diff --git a/hw/mips/mips_mipssim.c b/hw/mips/mips_mipssim.c
>              index 282bbecb24..c1933231e2 100644
>              --- a/hw/mips/mips_mipssim.c
>              +++ b/hw/mips/mips_mipssim.c
>              @@ -166,7 +166,7 @@ mips_mipssim_init(MachineState *machine)
>                    qemu_register_reset(main_cpu_reset, reset_info);
> 
>                    /* Allocate RAM. */
>              -    memory_region_allocate_system_memory(ram, NULL,
>         "mips_mipssim.ram",
>              +    memory_region_allocate_system_memory(ram, machine,
>              "mips_mipssim.ram",
>                                                         ram_size);
>                    memory_region_init_ram(bios, NULL,
>         "mips_mipssim.bios", BIOS_SIZE,
>                                           &error_fatal);
>              diff --git a/hw/mips/mips_r4k.c b/hw/mips/mips_r4k.c
>              index bc0be26544..59f8cacfb6 100644
>              --- a/hw/mips/mips_r4k.c
>              +++ b/hw/mips/mips_r4k.c
>              @@ -203,7 +203,8 @@ void mips_r4k_init(MachineState *machine)
>                                     " maximum 256MB", ram_size / MiB);
>                        exit(1);
>                    }
>              -    memory_region_allocate_system_memory(ram, NULL,
>         "mips_r4k.ram",
>              ram_size);
>              +    memory_region_allocate_system_memory(ram, machine,
>         "mips_r4k.ram",
>              +                                         ram_size);
> 
>                    memory_region_add_subregion(address_space_mem, 0, ram);
> 
>              --     2.21.0
> 
>
Aleksandar Markovic Oct. 21, 2019, 11:10 a.m. UTC | #5
On Monday, October 21, 2019, Philippe Mathieu-Daudé <philmd@redhat.com>
wrote:

> On 10/21/19 12:56 PM, Aleksandar Markovic wrote:
>
>>
>>
>> On Monday, October 21, 2019, Philippe Mathieu-Daudé <philmd@redhat.com
>> <mailto:philmd@redhat.com>> wrote:
>>
>>     Hi Aleksandar,
>>
>>     On 10/21/19 8:25 AM, Aleksandar Markovic wrote:
>>
>>
>>
>>         On Monday, October 21, 2019, Philippe Mathieu-Daudé
>>         <philmd@redhat.com <mailto:philmd@redhat.com>
>>         <mailto:philmd@redhat.com <mailto:philmd@redhat.com>>> wrote:
>>
>>              Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com
>>         <mailto:philmd@redhat.com>
>>              <mailto:philmd@redhat.com <mailto:philmd@redhat.com>>>
>>              ---
>>                hw/mips/boston.c        | 2 +-
>>                hw/mips/mips_fulong2e.c | 3 ++-
>>                hw/mips/mips_jazz.c     | 2 +-
>>                hw/mips/mips_malta.c    | 2 +-
>>                hw/mips/mips_mipssim.c  | 2 +-
>>                hw/mips/mips_r4k.c      | 3 ++-
>>                6 files changed, 8 insertions(+), 6 deletions(-)
>>
>>
>>         Philippe, can this patch be applied independently (on other
>>         patches of this series)?
>>
>>
>>     Unfortunately not because patch #9 changed the prototype of
>>     memory_region_allocate_system_memory() so this patch alone
>>     won't build.
>>
>>     I rather expect this series goes as a whole via the machine-next
>>     tree.
>>
>>     Do you mind giving your Acked-by tag to this patch?
>>
>>
>> I can't, sorry, for MIPS target, we don't accept patches with empty
>> commit messages.
>>
>
> I see, I'v been wondering what to do, if simply repeating the patch
> subject or the cover, but since the series applies to all targets, this
> seems overkill. I think I'll simply repeat the subject then.
>
>
Can't you at least add a sentence on why is this needed, or what is
achieved?

Thanks,

A.



>
>> A.
>>
>>
>>     Thanks,
>>
>>     Phil.
>>
>>
>>
>>              diff --git a/hw/mips/boston.c b/hw/mips/boston.c
>>              index ca7d813a52..8445fee0f1 100644
>>              --- a/hw/mips/boston.c
>>              +++ b/hw/mips/boston.c
>>              @@ -474,7 +474,7 @@ static void
>>         boston_mach_init(MachineState *machine)
>>                    memory_region_add_subregion_overlap(sys_mem,
>> 0x18000000,
>>              flash, 0);
>>
>>                    ddr = g_new(MemoryRegion, 1);
>>              -    memory_region_allocate_system_memory(ddr, NULL,
>>         "boston.ddr",
>>              +    memory_region_allocate_system_memory(ddr, machine,
>>         "boston.ddr",
>>
>> machine->ram_size);
>>                    memory_region_add_subregion_overlap(sys_mem,
>>         0x80000000, ddr, 0);
>>
>>              diff --git a/hw/mips/mips_fulong2e.c
>> b/hw/mips/mips_fulong2e.c
>>              index cf537dd7e6..d5a5cef619 100644
>>              --- a/hw/mips/mips_fulong2e.c
>>              +++ b/hw/mips/mips_fulong2e.c
>>              @@ -318,7 +318,8 @@ static void
>> mips_fulong2e_init(MachineState
>>              *machine)
>>                    ram_size = 256 * MiB;
>>
>>                    /* allocate RAM */
>>              -    memory_region_allocate_system_memory(ram, NULL,
>>         "fulong2e.ram",
>>              ram_size);
>>              +    memory_region_allocate_system_memory(ram, machine,
>>              +                                         "fulong2e.ram",
>>         ram_size);
>>                    memory_region_init_ram(bios, NULL, "fulong2e.bios",
>>         BIOS_SIZE,
>>                                           &error_fatal);
>>                    memory_region_set_readonly(bios, true);
>>              diff --git a/hw/mips/mips_jazz.c b/hw/mips/mips_jazz.c
>>              index 8d010a0b6e..88b125855f 100644
>>              --- a/hw/mips/mips_jazz.c
>>              +++ b/hw/mips/mips_jazz.c
>>              @@ -188,7 +188,7 @@ static void mips_jazz_init(MachineState
>>         *machine,
>>                    cc->do_transaction_failed =
>>         mips_jazz_do_transaction_failed;
>>
>>                    /* allocate RAM */
>>              -    memory_region_allocate_system_memory(ram, NULL,
>>         "mips_jazz.ram",
>>              +    memory_region_allocate_system_memory(ram, machine,
>>         "mips_jazz.ram",
>>
>> machine->ram_size);
>>                    memory_region_add_subregion(address_space, 0, ram);
>>
>>              diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c
>>              index 4d9c64b36a..af56a29ccb 100644
>>              --- a/hw/mips/mips_malta.c
>>              +++ b/hw/mips/mips_malta.c
>>              @@ -1267,7 +1267,7 @@ void mips_malta_init(MachineState
>>         *machine)
>>                    }
>>
>>                    /* register RAM at high address where it is
>>         undisturbed by IO */
>>              -    memory_region_allocate_system_memory(ram_high, NULL,
>>              "mips_malta.ram",
>>              +    memory_region_allocate_system_memory(ram_high, machine,
>>              "mips_malta.ram",
>>                                                         ram_size);
>>                    memory_region_add_subregion(system_memory,
>>         0x80000000, ram_high);
>>
>>              diff --git a/hw/mips/mips_mipssim.c b/hw/mips/mips_mipssim.c
>>              index 282bbecb24..c1933231e2 100644
>>              --- a/hw/mips/mips_mipssim.c
>>              +++ b/hw/mips/mips_mipssim.c
>>              @@ -166,7 +166,7 @@ mips_mipssim_init(MachineState *machine)
>>                    qemu_register_reset(main_cpu_reset, reset_info);
>>
>>                    /* Allocate RAM. */
>>              -    memory_region_allocate_system_memory(ram, NULL,
>>         "mips_mipssim.ram",
>>              +    memory_region_allocate_system_memory(ram, machine,
>>              "mips_mipssim.ram",
>>                                                         ram_size);
>>                    memory_region_init_ram(bios, NULL,
>>         "mips_mipssim.bios", BIOS_SIZE,
>>                                           &error_fatal);
>>              diff --git a/hw/mips/mips_r4k.c b/hw/mips/mips_r4k.c
>>              index bc0be26544..59f8cacfb6 100644
>>              --- a/hw/mips/mips_r4k.c
>>              +++ b/hw/mips/mips_r4k.c
>>              @@ -203,7 +203,8 @@ void mips_r4k_init(MachineState *machine)
>>                                     " maximum 256MB", ram_size / MiB);
>>                        exit(1);
>>                    }
>>              -    memory_region_allocate_system_memory(ram, NULL,
>>         "mips_r4k.ram",
>>              ram_size);
>>              +    memory_region_allocate_system_memory(ram, machine,
>>         "mips_r4k.ram",
>>              +                                         ram_size);
>>
>>                    memory_region_add_subregion(address_space_mem, 0,
>> ram);
>>
>>              --     2.21.0
>>
>>
>>
Philippe Mathieu-Daudé Oct. 21, 2019, 11:28 a.m. UTC | #6
On 10/21/19 1:10 PM, Aleksandar Markovic wrote:
> On Monday, October 21, 2019, Philippe Mathieu-Daudé <philmd@redhat.com 
> <mailto:philmd@redhat.com>> wrote:
> 
>     On 10/21/19 12:56 PM, Aleksandar Markovic wrote:
> 
> 
> 
>         On Monday, October 21, 2019, Philippe Mathieu-Daudé
>         <philmd@redhat.com <mailto:philmd@redhat.com>
>         <mailto:philmd@redhat.com <mailto:philmd@redhat.com>>> wrote:
> 
>              Hi Aleksandar,
> 
>              On 10/21/19 8:25 AM, Aleksandar Markovic wrote:
> 
> 
> 
>                  On Monday, October 21, 2019, Philippe Mathieu-Daudé
>                  <philmd@redhat.com <mailto:philmd@redhat.com>
>         <mailto:philmd@redhat.com <mailto:philmd@redhat.com>>
>                  <mailto:philmd@redhat.com <mailto:philmd@redhat.com>
>         <mailto:philmd@redhat.com <mailto:philmd@redhat.com>>>> wrote:
> 
>                       Signed-off-by: Philippe Mathieu-Daudé
>         <philmd@redhat.com <mailto:philmd@redhat.com>
>                  <mailto:philmd@redhat.com <mailto:philmd@redhat.com>>
>                       <mailto:philmd@redhat.com
>         <mailto:philmd@redhat.com> <mailto:philmd@redhat.com
>         <mailto:philmd@redhat.com>>>>
>                       ---
>                         hw/mips/boston.c        | 2 +-
>                         hw/mips/mips_fulong2e.c | 3 ++-
>                         hw/mips/mips_jazz.c     | 2 +-
>                         hw/mips/mips_malta.c    | 2 +-
>                         hw/mips/mips_mipssim.c  | 2 +-
>                         hw/mips/mips_r4k.c      | 3 ++-
>                         6 files changed, 8 insertions(+), 6 deletions(-)
> 
> 
>                  Philippe, can this patch be applied independently (on other
>                  patches of this series)?
> 
> 
>              Unfortunately not because patch #9 changed the prototype of
>              memory_region_allocate_system_memory() so this patch alone
>              won't build.
> 
>              I rather expect this series goes as a whole via the
>         machine-next
>              tree.
> 
>              Do you mind giving your Acked-by tag to this patch?
> 
> 
>         I can't, sorry, for MIPS target, we don't accept patches with
>         empty commit messages.
> 
> 
>     I see, I'v been wondering what to do, if simply repeating the patch
>     subject or the cover, but since the series applies to all targets,
>     this seems overkill. I think I'll simply repeat the subject then.
> 
> 
> Can't you at least add a sentence on why is this needed, or what is 
> achieved?

You are alright, I'll do.

> 
> Thanks,
> 
> A.
> 
> 
>         A.
> 
> 
>              Thanks,
> 
>              Phil.
> 
> 
> 
>                       diff --git a/hw/mips/boston.c b/hw/mips/boston.c
>                       index ca7d813a52..8445fee0f1 100644
>                       --- a/hw/mips/boston.c
>                       +++ b/hw/mips/boston.c
>                       @@ -474,7 +474,7 @@ static void
>                  boston_mach_init(MachineState *machine)
>                             memory_region_add_subregion_overlap(sys_mem,
>         0x18000000,
>                       flash, 0);
> 
>                             ddr = g_new(MemoryRegion, 1);
>                       -    memory_region_allocate_system_memory(ddr, NULL,
>                  "boston.ddr",
>                       +    memory_region_allocate_system_memory(ddr,
>         machine,
>                  "boston.ddr",
>                                                                 
>         machine->ram_size);
>                             memory_region_add_subregion_overlap(sys_mem,
>                  0x80000000, ddr, 0);
> 
>                       diff --git a/hw/mips/mips_fulong2e.c
>         b/hw/mips/mips_fulong2e.c
>                       index cf537dd7e6..d5a5cef619 100644
>                       --- a/hw/mips/mips_fulong2e.c
>                       +++ b/hw/mips/mips_fulong2e.c
>                       @@ -318,7 +318,8 @@ static void
>         mips_fulong2e_init(MachineState
>                       *machine)
>                             ram_size = 256 * MiB;
> 
>                             /* allocate RAM */
>                       -    memory_region_allocate_system_memory(ram, NULL,
>                  "fulong2e.ram",
>                       ram_size);
>                       +    memory_region_allocate_system_memory(ram,
>         machine,
>                       +                                       
>           "fulong2e.ram",
>                  ram_size);
>                             memory_region_init_ram(bios, NULL,
>         "fulong2e.bios",
>                  BIOS_SIZE,
>                                                    &error_fatal);
>                             memory_region_set_readonly(bios, true);
>                       diff --git a/hw/mips/mips_jazz.c b/hw/mips/mips_jazz.c
>                       index 8d010a0b6e..88b125855f 100644
>                       --- a/hw/mips/mips_jazz.c
>                       +++ b/hw/mips/mips_jazz.c
>                       @@ -188,7 +188,7 @@ static void
>         mips_jazz_init(MachineState
>                  *machine,
>                             cc->do_transaction_failed =
>                  mips_jazz_do_transaction_failed;
> 
>                             /* allocate RAM */
>                       -    memory_region_allocate_system_memory(ram, NULL,
>                  "mips_jazz.ram",
>                       +    memory_region_allocate_system_memory(ram,
>         machine,
>                  "mips_jazz.ram",
>                                                                 
>         machine->ram_size);
>                             memory_region_add_subregion(address_space,
>         0, ram);
> 
>                       diff --git a/hw/mips/mips_malta.c
>         b/hw/mips/mips_malta.c
>                       index 4d9c64b36a..af56a29ccb 100644
>                       --- a/hw/mips/mips_malta.c
>                       +++ b/hw/mips/mips_malta.c
>                       @@ -1267,7 +1267,7 @@ void
>         mips_malta_init(MachineState
>                  *machine)
>                             }
> 
>                             /* register RAM at high address where it is
>                  undisturbed by IO */
>                       -   
>         memory_region_allocate_system_memory(ram_high, NULL,
>                       "mips_malta.ram",
>                       +   
>         memory_region_allocate_system_memory(ram_high, machine,
>                       "mips_malta.ram",
>                                                                  ram_size);
>                             memory_region_add_subregion(system_memory,
>                  0x80000000, ram_high);
> 
>                       diff --git a/hw/mips/mips_mipssim.c
>         b/hw/mips/mips_mipssim.c
>                       index 282bbecb24..c1933231e2 100644
>                       --- a/hw/mips/mips_mipssim.c
>                       +++ b/hw/mips/mips_mipssim.c
>                       @@ -166,7 +166,7 @@ mips_mipssim_init(MachineState
>         *machine)
>                             qemu_register_reset(main_cpu_reset, reset_info);
> 
>                             /* Allocate RAM. */
>                       -    memory_region_allocate_system_memory(ram, NULL,
>                  "mips_mipssim.ram",
>                       +    memory_region_allocate_system_memory(ram,
>         machine,
>                       "mips_mipssim.ram",
>                                                                  ram_size);
>                             memory_region_init_ram(bios, NULL,
>                  "mips_mipssim.bios", BIOS_SIZE,
>                                                    &error_fatal);
>                       diff --git a/hw/mips/mips_r4k.c b/hw/mips/mips_r4k.c
>                       index bc0be26544..59f8cacfb6 100644
>                       --- a/hw/mips/mips_r4k.c
>                       +++ b/hw/mips/mips_r4k.c
>                       @@ -203,7 +203,8 @@ void
>         mips_r4k_init(MachineState *machine)
>                                              " maximum 256MB", ram_size
>         / MiB);
>                                 exit(1);
>                             }
>                       -    memory_region_allocate_system_memory(ram, NULL,
>                  "mips_r4k.ram",
>                       ram_size);
>                       +    memory_region_allocate_system_memory(ram,
>         machine,
>                  "mips_r4k.ram",
>                       +                                         ram_size);
> 
>                           
>           memory_region_add_subregion(address_space_mem, 0, ram);
> 
>                       --     2.21.0
> 
>
Aleksandar Markovic Oct. 21, 2019, 12:10 p.m. UTC | #7
On Monday, October 21, 2019, Philippe Mathieu-Daudé <philmd@redhat.com>
wrote:

> On 10/21/19 1:10 PM, Aleksandar Markovic wrote:
>
>> On Monday, October 21, 2019, Philippe Mathieu-Daudé <philmd@redhat.com
>> <mailto:philmd@redhat.com>> wrote:
>>
>>     On 10/21/19 12:56 PM, Aleksandar Markovic wrote:
>>
>>
>>
>>         On Monday, October 21, 2019, Philippe Mathieu-Daudé
>>         <philmd@redhat.com <mailto:philmd@redhat.com>
>>         <mailto:philmd@redhat.com <mailto:philmd@redhat.com>>> wrote:
>>
>>              Hi Aleksandar,
>>
>>              On 10/21/19 8:25 AM, Aleksandar Markovic wrote:
>>
>>
>>
>>                  On Monday, October 21, 2019, Philippe Mathieu-Daudé
>>                  <philmd@redhat.com <mailto:philmd@redhat.com>
>>         <mailto:philmd@redhat.com <mailto:philmd@redhat.com>>
>>                  <mailto:philmd@redhat.com <mailto:philmd@redhat.com>
>>         <mailto:philmd@redhat.com <mailto:philmd@redhat.com>>>> wrote:
>>
>>                       Signed-off-by: Philippe Mathieu-Daudé
>>         <philmd@redhat.com <mailto:philmd@redhat.com>
>>                  <mailto:philmd@redhat.com <mailto:philmd@redhat.com>>
>>                       <mailto:philmd@redhat.com
>>         <mailto:philmd@redhat.com> <mailto:philmd@redhat.com
>>         <mailto:philmd@redhat.com>>>>
>>                       ---
>>                         hw/mips/boston.c        | 2 +-
>>                         hw/mips/mips_fulong2e.c | 3 ++-
>>                         hw/mips/mips_jazz.c     | 2 +-
>>                         hw/mips/mips_malta.c    | 2 +-
>>                         hw/mips/mips_mipssim.c  | 2 +-
>>                         hw/mips/mips_r4k.c      | 3 ++-
>>                         6 files changed, 8 insertions(+), 6 deletions(-)
>>
>>
>>                  Philippe, can this patch be applied independently (on
>> other
>>                  patches of this series)?
>>
>>
>>              Unfortunately not because patch #9 changed the prototype of
>>              memory_region_allocate_system_memory() so this patch alone
>>              won't build.
>>
>>              I rather expect this series goes as a whole via the
>>         machine-next
>>              tree.
>>
>>              Do you mind giving your Acked-by tag to this patch?
>>
>>
>>         I can't, sorry, for MIPS target, we don't accept patches with
>>         empty commit messages.
>>
>>
>>     I see, I'v been wondering what to do, if simply repeating the patch
>>     subject or the cover, but since the series applies to all targets,
>>     this seems overkill. I think I'll simply repeat the subject then.
>>
>>
>> Can't you at least add a sentence on why is this needed, or what is
>> achieved?
>>
>
> You are alright, I'll do.



Cool, I'd appreciate it very much.

A.




>
>
>> Thanks,
>>
>> A.
>>
>>
>>         A.
>>
>>
>>              Thanks,
>>
>>              Phil.
>>
>>
>>
>>                       diff --git a/hw/mips/boston.c b/hw/mips/boston.c
>>                       index ca7d813a52..8445fee0f1 100644
>>                       --- a/hw/mips/boston.c
>>                       +++ b/hw/mips/boston.c
>>                       @@ -474,7 +474,7 @@ static void
>>                  boston_mach_init(MachineState *machine)
>>                             memory_region_add_subregion_overlap(sys_mem,
>>         0x18000000,
>>                       flash, 0);
>>
>>                             ddr = g_new(MemoryRegion, 1);
>>                       -    memory_region_allocate_system_memory(ddr,
>> NULL,
>>                  "boston.ddr",
>>                       +    memory_region_allocate_system_memory(ddr,
>>         machine,
>>                  "boston.ddr",
>>
>> machine->ram_size);
>>                             memory_region_add_subregion_overlap(sys_mem,
>>                  0x80000000, ddr, 0);
>>
>>                       diff --git a/hw/mips/mips_fulong2e.c
>>         b/hw/mips/mips_fulong2e.c
>>                       index cf537dd7e6..d5a5cef619 100644
>>                       --- a/hw/mips/mips_fulong2e.c
>>                       +++ b/hw/mips/mips_fulong2e.c
>>                       @@ -318,7 +318,8 @@ static void
>>         mips_fulong2e_init(MachineState
>>                       *machine)
>>                             ram_size = 256 * MiB;
>>
>>                             /* allocate RAM */
>>                       -    memory_region_allocate_system_memory(ram,
>> NULL,
>>                  "fulong2e.ram",
>>                       ram_size);
>>                       +    memory_region_allocate_system_memory(ram,
>>         machine,
>>                       +
>>  "fulong2e.ram",
>>                  ram_size);
>>                             memory_region_init_ram(bios, NULL,
>>         "fulong2e.bios",
>>                  BIOS_SIZE,
>>                                                    &error_fatal);
>>                             memory_region_set_readonly(bios, true);
>>                       diff --git a/hw/mips/mips_jazz.c
>> b/hw/mips/mips_jazz.c
>>                       index 8d010a0b6e..88b125855f 100644
>>                       --- a/hw/mips/mips_jazz.c
>>                       +++ b/hw/mips/mips_jazz.c
>>                       @@ -188,7 +188,7 @@ static void
>>         mips_jazz_init(MachineState
>>                  *machine,
>>                             cc->do_transaction_failed =
>>                  mips_jazz_do_transaction_failed;
>>
>>                             /* allocate RAM */
>>                       -    memory_region_allocate_system_memory(ram,
>> NULL,
>>                  "mips_jazz.ram",
>>                       +    memory_region_allocate_system_memory(ram,
>>         machine,
>>                  "mips_jazz.ram",
>>
>> machine->ram_size);
>>                             memory_region_add_subregion(address_space,
>>         0, ram);
>>
>>                       diff --git a/hw/mips/mips_malta.c
>>         b/hw/mips/mips_malta.c
>>                       index 4d9c64b36a..af56a29ccb 100644
>>                       --- a/hw/mips/mips_malta.c
>>                       +++ b/hw/mips/mips_malta.c
>>                       @@ -1267,7 +1267,7 @@ void
>>         mips_malta_init(MachineState
>>                  *machine)
>>                             }
>>
>>                             /* register RAM at high address where it is
>>                  undisturbed by IO */
>>                       -           memory_region_allocate_system_memory(ram_high,
>> NULL,
>>                       "mips_malta.ram",
>>                       +           memory_region_allocate_system_memory(ram_high,
>> machine,
>>                       "mips_malta.ram",
>>
>> ram_size);
>>                             memory_region_add_subregion(system_memory,
>>                  0x80000000, ram_high);
>>
>>                       diff --git a/hw/mips/mips_mipssim.c
>>         b/hw/mips/mips_mipssim.c
>>                       index 282bbecb24..c1933231e2 100644
>>                       --- a/hw/mips/mips_mipssim.c
>>                       +++ b/hw/mips/mips_mipssim.c
>>                       @@ -166,7 +166,7 @@ mips_mipssim_init(MachineState
>>         *machine)
>>                             qemu_register_reset(main_cpu_reset,
>> reset_info);
>>
>>                             /* Allocate RAM. */
>>                       -    memory_region_allocate_system_memory(ram,
>> NULL,
>>                  "mips_mipssim.ram",
>>                       +    memory_region_allocate_system_memory(ram,
>>         machine,
>>                       "mips_mipssim.ram",
>>
>> ram_size);
>>                             memory_region_init_ram(bios, NULL,
>>                  "mips_mipssim.bios", BIOS_SIZE,
>>                                                    &error_fatal);
>>                       diff --git a/hw/mips/mips_r4k.c b/hw/mips/mips_r4k.c
>>                       index bc0be26544..59f8cacfb6 100644
>>                       --- a/hw/mips/mips_r4k.c
>>                       +++ b/hw/mips/mips_r4k.c
>>                       @@ -203,7 +203,8 @@ void
>>         mips_r4k_init(MachineState *machine)
>>                                              " maximum 256MB", ram_size
>>         / MiB);
>>                                 exit(1);
>>                             }
>>                       -    memory_region_allocate_system_memory(ram,
>> NULL,
>>                  "mips_r4k.ram",
>>                       ram_size);
>>                       +    memory_region_allocate_system_memory(ram,
>>         machine,
>>                  "mips_r4k.ram",
>>                       +                                         ram_size);
>>
>>                                     memory_region_add_subregion(address_space_mem,
>> 0, ram);
>>
>>                       --     2.21.0
>>
>>
>>
Aleksandar Markovic Oct. 21, 2019, 7:24 p.m. UTC | #8
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  hw/mips/boston.c        | 2 +-
>  hw/mips/mips_fulong2e.c | 3 ++-
>  hw/mips/mips_jazz.c     | 2 +-
>  hw/mips/mips_malta.c    | 2 +-
>  hw/mips/mips_mipssim.c  | 2 +-
>  hw/mips/mips_r4k.c      | 3 ++-
>  6 files changed, 8 insertions(+), 6 deletions(-)

When the commit message is completed:

Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com>
diff mbox series

Patch

diff --git a/hw/mips/boston.c b/hw/mips/boston.c
index ca7d813a52..8445fee0f1 100644
--- a/hw/mips/boston.c
+++ b/hw/mips/boston.c
@@ -474,7 +474,7 @@  static void boston_mach_init(MachineState *machine)
     memory_region_add_subregion_overlap(sys_mem, 0x18000000, flash, 0);
 
     ddr = g_new(MemoryRegion, 1);
-    memory_region_allocate_system_memory(ddr, NULL, "boston.ddr",
+    memory_region_allocate_system_memory(ddr, machine, "boston.ddr",
                                          machine->ram_size);
     memory_region_add_subregion_overlap(sys_mem, 0x80000000, ddr, 0);
 
diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c
index cf537dd7e6..d5a5cef619 100644
--- a/hw/mips/mips_fulong2e.c
+++ b/hw/mips/mips_fulong2e.c
@@ -318,7 +318,8 @@  static void mips_fulong2e_init(MachineState *machine)
     ram_size = 256 * MiB;
 
     /* allocate RAM */
-    memory_region_allocate_system_memory(ram, NULL, "fulong2e.ram", ram_size);
+    memory_region_allocate_system_memory(ram, machine,
+                                         "fulong2e.ram", ram_size);
     memory_region_init_ram(bios, NULL, "fulong2e.bios", BIOS_SIZE,
                            &error_fatal);
     memory_region_set_readonly(bios, true);
diff --git a/hw/mips/mips_jazz.c b/hw/mips/mips_jazz.c
index 8d010a0b6e..88b125855f 100644
--- a/hw/mips/mips_jazz.c
+++ b/hw/mips/mips_jazz.c
@@ -188,7 +188,7 @@  static void mips_jazz_init(MachineState *machine,
     cc->do_transaction_failed = mips_jazz_do_transaction_failed;
 
     /* allocate RAM */
-    memory_region_allocate_system_memory(ram, NULL, "mips_jazz.ram",
+    memory_region_allocate_system_memory(ram, machine, "mips_jazz.ram",
                                          machine->ram_size);
     memory_region_add_subregion(address_space, 0, ram);
 
diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c
index 4d9c64b36a..af56a29ccb 100644
--- a/hw/mips/mips_malta.c
+++ b/hw/mips/mips_malta.c
@@ -1267,7 +1267,7 @@  void mips_malta_init(MachineState *machine)
     }
 
     /* register RAM at high address where it is undisturbed by IO */
-    memory_region_allocate_system_memory(ram_high, NULL, "mips_malta.ram",
+    memory_region_allocate_system_memory(ram_high, machine, "mips_malta.ram",
                                          ram_size);
     memory_region_add_subregion(system_memory, 0x80000000, ram_high);
 
diff --git a/hw/mips/mips_mipssim.c b/hw/mips/mips_mipssim.c
index 282bbecb24..c1933231e2 100644
--- a/hw/mips/mips_mipssim.c
+++ b/hw/mips/mips_mipssim.c
@@ -166,7 +166,7 @@  mips_mipssim_init(MachineState *machine)
     qemu_register_reset(main_cpu_reset, reset_info);
 
     /* Allocate RAM. */
-    memory_region_allocate_system_memory(ram, NULL, "mips_mipssim.ram",
+    memory_region_allocate_system_memory(ram, machine, "mips_mipssim.ram",
                                          ram_size);
     memory_region_init_ram(bios, NULL, "mips_mipssim.bios", BIOS_SIZE,
                            &error_fatal);
diff --git a/hw/mips/mips_r4k.c b/hw/mips/mips_r4k.c
index bc0be26544..59f8cacfb6 100644
--- a/hw/mips/mips_r4k.c
+++ b/hw/mips/mips_r4k.c
@@ -203,7 +203,8 @@  void mips_r4k_init(MachineState *machine)
                      " maximum 256MB", ram_size / MiB);
         exit(1);
     }
-    memory_region_allocate_system_memory(ram, NULL, "mips_r4k.ram", ram_size);
+    memory_region_allocate_system_memory(ram, machine, "mips_r4k.ram",
+                                         ram_size);
 
     memory_region_add_subregion(address_space_mem, 0, ram);