All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Eric Auger <eric.auger@redhat.com>
Cc: Eric Auger <eric.auger.pro@gmail.com>,
	QEMU Developers <qemu-devel@nongnu.org>,
	qemu-arm <qemu-arm@nongnu.org>,
	Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>,
	Igor Mammedov <imammedo@redhat.com>,
	David Hildenbrand <david@redhat.com>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	David Gibson <david@gibson.dropbear.id.au>,
	Andrew Jones <drjones@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v6 05/18] hw/arm/virt: Split the memory map description
Date: Thu, 14 Feb 2019 17:07:42 +0000	[thread overview]
Message-ID: <CAFEAcA9z83y2Xfp0QC5-uKY-6d5zOvxiD=vy7=oG9N2onqCnmA@mail.gmail.com> (raw)
In-Reply-To: <20190205173306.20483-6-eric.auger@redhat.com>

On Tue, 5 Feb 2019 at 17:33, Eric Auger <eric.auger@redhat.com> wrote:
>
> In the prospect to introduce an extended memory map supporting more
> RAM, let's split the memory map array into two parts:
>
> - the former a15memmap contains regions below and including the RAM
> - extended_memmap, only initialized with entries located after the RAM.
>   Only the size of the region is initialized there since their base
>   address will be dynamically computed, depending on the top of the
>   RAM (initial RAM at the moment), with same alignment as their size.
>
> This new split will allow to grow the RAM size without changing the
> description of the high regions.

This change makes it clear that "a15memmap" is badly misnamed.
I think we should change it to "base_memmap" here.

>
> The patch also moves the memory map setup into machvirt_init().
> The rationale is the memory map will be soon affected by the
> kvm_type() call that happens after virt_instance_init() and
> before machvirt_init().
>
> At that point the memory map is not changed, ie. the initial RAM can

"At this point" ?

> grow up to 256GiB. Then come the high IO regions with same layout as
> before.
>
> Signed-off-by: Eric Auger <eric.auger@redhat.com>
>
> ---
> v5 -> v6
> - removal of many macros in units.h
> - introduce the virt_set_memmap helper
> - new computation for offsets of high IO regions
> - add comments
> ---
>  hw/arm/virt.c         | 45 ++++++++++++++++++++++++++++++++++++++-----
>  include/hw/arm/virt.h | 14 ++++++++++----
>  2 files changed, 50 insertions(+), 9 deletions(-)
>
> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
> index a1955e7764..2b15839d0b 100644
> --- a/hw/arm/virt.c
> +++ b/hw/arm/virt.c
> @@ -29,6 +29,7 @@
>   */
>
>  #include "qemu/osdep.h"
> +#include "qemu/units.h"
>  #include "qapi/error.h"
>  #include "hw/sysbus.h"
>  #include "hw/arm/arm.h"
> @@ -149,11 +150,20 @@ static const MemMapEntry a15memmap[] = {
>      [VIRT_PCIE_PIO] =           { 0x3eff0000, 0x00010000 },
>      [VIRT_PCIE_ECAM] =          { 0x3f000000, 0x01000000 },
>      [VIRT_MEM] =                { 0x40000000, RAMLIMIT_BYTES },
> +};
> +
> +/*
> + * Highmem IO Regions: This memory map is floating, located after the RAM.
> + * Each IO region offset will be dynamically computed, depending on the
> + * top of the RAM, so that its base get the same alignment as the size,
> + * ie. a 512GiB region will be aligned on a 512GiB boundary.

I think you should say here that if there is less than 256GiB of RAM
then the floating area starts at the 256GiB mark.

> + */
> +static MemMapEntry extended_memmap[] = {
>      /* Additional 64 MB redist region (can contain up to 512 redistributors) */
> -    [VIRT_HIGH_GIC_REDIST2] =   { 0x4000000000ULL, 0x4000000 },
> -    [VIRT_HIGH_PCIE_ECAM] =     { 0x4010000000ULL, 0x10000000 },
> -    /* Second PCIe window, 512GB wide at the 512GB boundary */
> -    [VIRT_HIGH_PCIE_MMIO] =     { 0x8000000000ULL, 0x8000000000ULL },
> +    [VIRT_HIGH_GIC_REDIST2] =   { 0x0, 64 * MiB },
> +    [VIRT_HIGH_PCIE_ECAM] =     { 0x0, 256 * MiB },
> +    /* Second PCIe window */
> +    [VIRT_HIGH_PCIE_MMIO] =     { 0x0, 512 * GiB },
>  };
>
>  static const int a15irqmap[] = {
> @@ -1354,6 +1364,30 @@ static uint64_t virt_cpu_mp_affinity(VirtMachineState *vms, int idx)
>      return arm_cpu_mp_affinity(idx, clustersz);
>  }

Otherwise
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM

  reply	other threads:[~2019-02-14 17:18 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-05 17:32 [Qemu-devel] [PATCH v6 00/18] ARM virt: Initial RAM expansion and PCDIMM/NVDIMM support Eric Auger
2019-02-05 17:32 ` [Qemu-devel] [PATCH v6 01/18] update-linux-headers.sh: Copy new headers Eric Auger
2019-02-14 16:36   ` Peter Maydell
2019-02-21  6:15     ` Alexey Kardashevskiy
2019-02-05 17:32 ` [Qemu-devel] [PATCH v6 02/18] linux-headers: Update to v5.0-rc2 Eric Auger
2019-02-05 17:32 ` [Qemu-devel] [PATCH v6 03/18] hw/arm/boot: introduce fdt_add_memory_node helper Eric Auger
2019-02-14 16:49   ` Peter Maydell
2019-02-05 17:32 ` [Qemu-devel] [PATCH v6 04/18] hw/arm/virt: Rename highmem IO regions Eric Auger
2019-02-14 16:50   ` Peter Maydell
2019-02-05 17:32 ` [Qemu-devel] [PATCH v6 05/18] hw/arm/virt: Split the memory map description Eric Auger
2019-02-14 17:07   ` Peter Maydell [this message]
2019-02-05 17:32 ` [Qemu-devel] [PATCH v6 06/18] hw/boards: Add a MachineState parameter to kvm_type callback Eric Auger
2019-02-14 17:12   ` Peter Maydell
2019-02-05 17:32 ` [Qemu-devel] [PATCH v6 07/18] kvm: add kvm_arm_get_max_vm_phys_shift Eric Auger
2019-02-14 17:15   ` Peter Maydell
2019-02-18 18:03     ` Auger Eric
2019-02-05 17:32 ` [Qemu-devel] [PATCH v6 08/18] vl: Set machine ram_size, maxram_size and ram_slots earlier Eric Auger
2019-02-14 17:16   ` Peter Maydell
2019-02-05 17:32 ` [Qemu-devel] [PATCH v6 09/18] hw/arm/virt: Implement kvm_type function for 4.0 machine Eric Auger
2019-02-14 17:29   ` Peter Maydell
2019-02-18 21:29     ` Auger Eric
2019-02-19  7:49       ` Igor Mammedov
2019-02-19  8:52         ` Auger Eric
2019-02-18 10:07   ` Igor Mammedov
2019-02-19 15:56     ` Auger Eric
2019-02-05 17:32 ` [Qemu-devel] [PATCH v6 10/18] hw/arm/virt: Bump the 255GB initial RAM limit Eric Auger
2019-02-07 15:19   ` Shameerali Kolothum Thodi
2019-02-07 15:25     ` Auger Eric
2019-02-05 17:32 ` [Qemu-devel] [PATCH v6 11/18] hw/arm/virt: Add memory hotplug framework Eric Auger
2019-02-14 17:15   ` David Hildenbrand
2019-02-18 18:10     ` Auger Eric
2019-02-05 17:33 ` [Qemu-devel] [PATCH v6 12/18] hw/arm/boot: Expose the PC-DIMM nodes in the DT Eric Auger
2019-02-18  8:58   ` Igor Mammedov
2019-02-20 15:30     ` Auger Eric
2019-02-21  9:27       ` Igor Mammedov
2019-02-05 17:33 ` [Qemu-devel] [PATCH v6 13/18] hw/arm/virt-acpi-build: Add PC-DIMM in SRAT Eric Auger
2019-02-18  8:14   ` Igor Mammedov
2019-02-05 17:33 ` [Qemu-devel] [PATCH v6 14/18] hw/arm/virt: Allocate device_memory Eric Auger
2019-02-18  9:31   ` Igor Mammedov
2019-02-19 15:53     ` Auger Eric
2019-02-19 15:56       ` David Hildenbrand
2019-02-21  9:36       ` Igor Mammedov
2019-02-21 12:37         ` Auger Eric
2019-02-21 12:44           ` David Hildenbrand
2019-02-21 13:07             ` Auger Eric
2019-02-05 17:33 ` [Qemu-devel] [PATCH v6 15/18] nvdimm: use configurable ACPI IO base and size Eric Auger
2019-02-18 10:21   ` Igor Mammedov
2019-02-05 17:33 ` [Qemu-devel] [PATCH v6 16/18] hw/arm/virt: Add nvdimm hot-plug infrastructure Eric Auger
2019-02-18 10:30   ` Igor Mammedov
2019-02-20 15:21     ` Auger Eric
2019-02-21 12:16       ` Igor Mammedov
2019-02-21 12:34         ` Auger Eric
2019-02-05 17:33 ` [Qemu-devel] [PATCH v6 17/18] hw/arm/boot: Expose the pmem nodes in the DT Eric Auger
2019-02-05 17:33 ` [Qemu-devel] [PATCH v6 18/18] hw/arm/virt: Add nvdimm and nvdimm-persistence options Eric Auger
2019-02-14 17:35 ` [Qemu-devel] [PATCH v6 00/18] ARM virt: Initial RAM expansion and PCDIMM/NVDIMM support Peter Maydell
2019-02-14 18:00   ` Auger Eric

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='CAFEAcA9z83y2Xfp0QC5-uKY-6d5zOvxiD=vy7=oG9N2onqCnmA@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=david@gibson.dropbear.id.au \
    --cc=david@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=drjones@redhat.com \
    --cc=eric.auger.pro@gmail.com \
    --cc=eric.auger@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=shameerali.kolothum.thodi@huawei.com \
    /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 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.