qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Aleksandar Markovic <aleksandar.m.mail@gmail.com>
To: Igor Mammedov <imammedo@redhat.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [PATCH REPOST v3 54/80] mips/mips_malta: use memdev for RAM
Date: Fri, 24 Jan 2020 18:16:10 +0100	[thread overview]
Message-ID: <CAL1e-=is6mH_GWh-es9YNcfrtCZ8DwO9DzYW2=___KxBOX7e6w@mail.gmail.com> (raw)
In-Reply-To: <1579779525-20065-55-git-send-email-imammedo@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 2989 bytes --]

On Thu, Jan 23, 2020 at 1:19 PM Igor Mammedov <imammedo@redhat.com> wrote:

> memory_region_allocate_system_memory() API is going away, so
> replace it with memdev allocated MemoryRegion. The later is
> initialized by generic code, so board only needs to opt in
> to memdev scheme by providing
>   MachineClass::default_ram_id
> and using MachineState::ram instead of manually initializing
> RAM memory region.
>
> Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  hw/mips/mips_malta.c | 10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)
>
>
Applied to MIPS queue.


> diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c
> index 5aaeaa8..77995a5 100644
> --- a/hw/mips/mips_malta.c
> +++ b/hw/mips/mips_malta.c
> @@ -1223,7 +1223,6 @@ void mips_malta_init(MachineState *machine)
>      char *filename;
>      PFlashCFI01 *fl;
>      MemoryRegion *system_memory = get_system_memory();
> -    MemoryRegion *ram_high = g_new(MemoryRegion, 1);
>      MemoryRegion *ram_low_preio = g_new(MemoryRegion, 1);
>      MemoryRegion *ram_low_postio;
>      MemoryRegion *bios, *bios_copy = g_new(MemoryRegion, 1);
> @@ -1261,13 +1260,11 @@ 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",
> -                                         ram_size);
> -    memory_region_add_subregion(system_memory, 0x80000000, ram_high);
> +    memory_region_add_subregion(system_memory, 0x80000000, machine->ram);
>
>      /* alias for pre IO hole access */
>      memory_region_init_alias(ram_low_preio, NULL,
> "mips_malta_low_preio.ram",
> -                             ram_high, 0, MIN(ram_size, 256 * MiB));
> +                             machine->ram, 0, MIN(ram_size, 256 * MiB));
>      memory_region_add_subregion(system_memory, 0, ram_low_preio);
>
>      /* alias for post IO hole access, if there is enough RAM */
> @@ -1275,7 +1272,7 @@ void mips_malta_init(MachineState *machine)
>          ram_low_postio = g_new(MemoryRegion, 1);
>          memory_region_init_alias(ram_low_postio, NULL,
>                                   "mips_malta_low_postio.ram",
> -                                 ram_high, 512 * MiB,
> +                                 machine->ram, 512 * MiB,
>                                   ram_size - 512 * MiB);
>          memory_region_add_subregion(system_memory, 512 * MiB,
>                                      ram_low_postio);
> @@ -1447,6 +1444,7 @@ static void mips_malta_machine_init(MachineClass *mc)
>  #else
>      mc->default_cpu_type = MIPS_CPU_TYPE_NAME("24Kf");
>  #endif
> +    mc->default_ram_id = "mips_malta.ram";
>  }
>
>  DEFINE_MACHINE("malta", mips_malta_machine_init)
> --
> 2.7.4
>
>
>

[-- Attachment #2: Type: text/html, Size: 4057 bytes --]

  reply	other threads:[~2020-01-24 17:17 UTC|newest]

Thread overview: 134+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-23 11:37 [PATCH REPOST v3 00/80] refactor main RAM allocation to use hostmem backend Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 01/80] numa: remove deprecated -mem-path fallback to anonymous RAM Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 02/80] machine: introduce memory-backend property Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 03/80] machine: alias -mem-path and -mem-prealloc into memory-foo backend Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 04/80] machine: introduce convenience MachineState::ram Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 05/80] initialize MachineState::ram in NUMA case Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 06/80] alpha:dp264: use memdev for RAM Igor Mammedov
2020-01-23 15:07   ` BALATON Zoltan
2020-01-24  8:13     ` Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 07/80] arm/aspeed: actually check RAM size Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 08/80] arm/aspeed: use memdev for RAM Igor Mammedov
2020-01-23 12:08   ` Joel Stanley
2020-01-23 11:37 ` [PATCH REPOST v3 09/80] arm/collie: " Igor Mammedov
2020-01-23 12:27   ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 10/80] arm/cubieboard: " Igor Mammedov
2020-01-23 12:30   ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 11/80] arm/digic_boards: " Igor Mammedov
2020-01-23 12:32   ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 12/80] arm/highbank: " Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 13/80] arm/imx25_pdk: drop RAM size fixup Igor Mammedov
2020-01-23 12:39   ` Andrew Jones
2020-01-23 14:32     ` Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 14/80] arm/imx25_pdk: use memdev for RAM Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 15/80] arm/integratorcp: " Igor Mammedov
2020-01-23 12:40   ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 16/80] arm/kzm: drop RAM size fixup Igor Mammedov
2020-01-23 22:23   ` Chubb, Peter (Data61, Kensington NSW)
2020-01-24  8:10     ` Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 17/80] arm/kzm: use memdev for RAM Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 18/80] arm/mcimx6ul-evk: " Igor Mammedov
2020-01-23 12:50   ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 19/80] arm/mcimx7d-sabre: " Igor Mammedov
2020-01-23 12:51   ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 20/80] arm/mps2-tz: " Igor Mammedov
2020-01-23 12:59   ` Andrew Jones
2020-01-23 13:39     ` Igor Mammedov
2020-01-23 14:37       ` Andrew Jones
2020-01-23 14:37   ` [PATCH v4 " Igor Mammedov
2020-01-23 14:47     ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 21/80] arm/mps2: " Igor Mammedov
2020-01-23 13:00   ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 22/80] arm/musicpal: " Igor Mammedov
2020-01-23 13:07   ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 23/80] arm/nseries: " Igor Mammedov
2020-01-23 13:09   ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 24/80] arm/omap_sx1: " Igor Mammedov
2020-01-23 13:12   ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 25/80] arm/palm: " Igor Mammedov
2020-01-23 13:13   ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 26/80] arm/raspi: " Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 27/80] arm/sabrelite: " Igor Mammedov
2020-01-23 13:15   ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 28/80] arm/sbsa-ref: " Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 29/80] arm/versatilepb: " Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 30/80] arm/vexpress: " Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 31/80] arm/virt: " Igor Mammedov
2020-01-23 13:17   ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 32/80] arm/xilinx_zynq: drop RAM size fixup Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 33/80] arm/xilinx_zynq: use memdev for RAM Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 34/80] arm/xlnx-versal-virt: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 35/80] arm/xlnx-zcu102: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 36/80] s390x/s390-virtio-ccw: " Igor Mammedov
2020-01-23 18:05   ` Cornelia Huck
2020-01-23 11:38 ` [PATCH REPOST v3 37/80] null-machine: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 38/80] cris/axis_dev88: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 39/80] hw/hppa/machine: Correctly check the firmware is in PDC range Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 40/80] hw/hppa/machine: Restrict the total memory size to 3GB Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 41/80] hw/hppa/machine: Map the PDC memory region with higher priority Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 42/80] hppa: use memdev for RAM Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 43/80] x86/microvm: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 44/80] x86/pc: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 45/80] lm32/lm32_boards: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 46/80] lm32/milkymist: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 47/80] m68k/an5206: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 48/80] m68k/mcf5208: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 49/80] m68k/next-cube: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 50/80] mips/boston-cube: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 51/80] mips/mips_fulong2e: drop RAM size fixup Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 52/80] mips/mips_fulong2e: use memdev for RAM Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 53/80] mips/mips_jazz: " Igor Mammedov
2020-01-24 17:15   ` Aleksandar Markovic
2020-01-23 11:38 ` [PATCH REPOST v3 54/80] mips/mips_malta: " Igor Mammedov
2020-01-24 17:16   ` Aleksandar Markovic [this message]
2020-01-23 11:38 ` [PATCH REPOST v3 55/80] mips/mips_mipssim: " Igor Mammedov
2020-01-24 17:17   ` Aleksandar Markovic
2020-01-23 11:38 ` [PATCH REPOST v3 56/80] mips/mips_r4k: " Igor Mammedov
2020-01-24 17:15   ` Aleksandar Markovic
2020-01-23 11:38 ` [PATCH REPOST v3 57/80] ppc/e500: drop RAM size fixup Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 58/80] ppc/e500: use memdev for RAM Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 59/80] ppc/mac_newworld: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 60/80] ppc/mac_oldworld: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 61/80] ppc/pnv: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 62/80] ppc/ppc405_boards: add RAM size checks Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 63/80] ppc/ppc405_boards: use memdev for RAM Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 64/80] ppc/{ppc440_bamboo, sam460ex}: drop RAM size fixup Igor Mammedov
2020-01-23 16:22   ` BALATON Zoltan
2020-01-27  3:39   ` [PATCH REPOST v3 64/80] ppc/{ppc440_bamboo,sam460ex}: " David Gibson
2020-01-23 11:38 ` [PATCH REPOST v3 65/80] ppc/{ppc440_bamboo, sam460ex}: use memdev for RAM Igor Mammedov
2020-01-23 16:23   ` BALATON Zoltan
2020-01-27  3:40   ` David Gibson
2020-01-23 11:38 ` [PATCH REPOST v3 66/80] ppc/prep: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 67/80] ppc/spapr: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 68/80] ppc/virtex_ml507: remove unused arguments Igor Mammedov
2020-01-24  9:40   ` David Gibson
2020-01-23 11:38 ` [PATCH REPOST v3 69/80] ppc/virtex_ml507: use memdev for RAM Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 70/80] sparc/leon3: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 71/80] sparc/sun4m: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 72/80] sparc/niagara: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 73/80] remove no longer used memory_region_allocate_system_memory() Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 74/80] exec: cleanup qemu_minrampagesize()/qemu_maxrampagesize() Igor Mammedov
2020-01-24 10:25   ` Igor Mammedov
2020-01-27  3:31     ` David Gibson
2020-01-27  8:06   ` [PATCH v3.1 " Igor Mammedov
2020-01-27  8:18     ` David Gibson
2020-01-23 11:38 ` [PATCH REPOST v3 75/80] exec: drop bogus mem_path from qemu_ram_alloc_from_fd() Igor Mammedov
2020-01-24  9:35   ` Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 76/80] make mem_path local variable Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 77/80] hostmem: introduce "prealloc-threads" property Igor Mammedov
2020-01-24  9:50   ` Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 78/80] hostmem: fix strict bind policy Igor Mammedov
2020-01-24 19:17   ` Halil Pasic
2020-01-27  7:39     ` Igor Mammedov
2020-01-27 14:41       ` Halil Pasic
2020-01-28 12:07         ` Igor Mammedov
2020-01-28 12:37           ` Halil Pasic
2020-01-23 11:38 ` [PATCH REPOST v3 79/80] tests:numa-test: make top level args dynamic and g_autofree(cli) cleanups Igor Mammedov
2020-01-23 16:25   ` BALATON Zoltan
2020-01-23 16:33   ` Thomas Huth
2020-01-23 11:38 ` [PATCH REPOST v3 80/80] tests:numa-test: use explicit memdev to specify node RAM Igor Mammedov
2020-01-23 16:52   ` Thomas Huth
2020-01-23 13:04 ` [PATCH REPOST v3 00/80] refactor main RAM allocation to use hostmem backend no-reply
2020-01-23 14:45 ` Laurent Vivier
2020-01-23 16:14   ` [PATCH v4 81/80] m68k/q800: use memdev for RAM Igor Mammedov
2020-01-23 19:31     ` Laurent Vivier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAL1e-=is6mH_GWh-es9YNcfrtCZ8DwO9DzYW2=___KxBOX7e6w@mail.gmail.com' \
    --to=aleksandar.m.mail@gmail.com \
    --cc=imammedo@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).