All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cornelia Huck <cohuck@redhat.com>
To: Gavin Shan <gshan@redhat.com>, qemu-arm@nongnu.org
Cc: qemu-devel@nongnu.org, maz@kernel.org, eric.auger@redhat.com,
	zhenyzha@redhat.com, richard.henderson@linaro.org,
	peter.maydell@linaro.org, shan.gavin@gmail.com
Subject: Re: [PATCH v6 6/7] hw/arm/virt: Add 'compact-highmem' property
Date: Tue, 25 Oct 2022 12:30:55 +0200	[thread overview]
Message-ID: <877d0ofb4w.fsf@redhat.com> (raw)
In-Reply-To: <20221024035416.34068-7-gshan@redhat.com>

On Mon, Oct 24 2022, Gavin Shan <gshan@redhat.com> wrote:

> After the improvement to high memory region address assignment is
> applied, the memory layout can be changed, introducing possible
> migration breakage. For example, VIRT_HIGH_PCIE_MMIO memory region
> is disabled or enabled when the optimization is applied or not, with
> the following configuration. The configuration is only achievable by
> modifying the source code until more properties are added to allow
> users selectively disable those high memory regions.
>
>   pa_bits              = 40;
>   vms->highmem_redists = false;
>   vms->highmem_ecam    = false;
>   vms->highmem_mmio    = true;
>
>   # qemu-system-aarch64 -accel kvm -cpu host    \
>     -machine virt-7.2,compact-highmem={on, off} \
>     -m 4G,maxmem=511G -monitor stdio
>
>   Region             compact-highmem=off         compact-highmem=on
>   ----------------------------------------------------------------
>   MEM                [1GB         512GB]        [1GB         512GB]
>   HIGH_GIC_REDISTS2  [512GB       512GB+64MB]   [disabled]
>   HIGH_PCIE_ECAM     [512GB+256MB 512GB+512MB]  [disabled]
>   HIGH_PCIE_MMIO     [disabled]                 [512GB       1TB]
>
> In order to keep backwords compatibility, we need to disable the
> optimization on machine, which is virt-7.1 or ealier than it. It
> means the optimization is enabled by default from virt-7.2. Besides,
> 'compact-highmem' property is added so that the optimization can be
> explicitly enabled or disabled on all machine types by users.
>
> Signed-off-by: Gavin Shan <gshan@redhat.com>
> Reviewed-by: Cornelia Huck <cohuck@redhat.com>
> Tested-by: Zhenyu Zhang <zhenyzha@redhat.com>
> ---
>  docs/system/arm/virt.rst |  4 ++++
>  hw/arm/virt.c            | 32 ++++++++++++++++++++++++++++++++
>  include/hw/arm/virt.h    |  1 +
>  3 files changed, 37 insertions(+)
>

(...)

> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
> index 4896f600b4..11b5685432 100644
> --- a/hw/arm/virt.c
> +++ b/hw/arm/virt.c
> @@ -174,6 +174,12 @@ static const MemMapEntry base_memmap[] = {
>   * Note the extended_memmap is sized so that it eventually also includes the
>   * base_memmap entries (VIRT_HIGH_GIC_REDIST2 index is greater than the last
>   * index of base_memmap).
> + *
> + * The memory map for these Highmem IO Regions can be in legacy or compact
> + * layout, depending on 'compact-highmem' property. With legacy layout, the
> + * PA space for one specific region is always reserved, even the region has

s/even/even if/

> + * been disabled or doesn't fit into the PA space. However, the PA space for
> + * the region won't be reserved in these circumstances with compact layout.
>   */
>  static MemMapEntry extended_memmap[] = {
>      /* Additional 64 MB redist region (can contain up to 512 redistributors) */


  reply	other threads:[~2022-10-25 10:32 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-24  3:54 [PATCH v6 0/7] hw/arm/virt: Improve address assignment for high memory regions Gavin Shan
2022-10-24  3:54 ` [PATCH v6 1/7] hw/arm/virt: Introduce virt_set_high_memmap() helper Gavin Shan
2022-10-24  3:54 ` [PATCH v6 2/7] hw/arm/virt: Rename variable size to region_size in virt_set_high_memmap() Gavin Shan
2022-10-24  3:54 ` [PATCH v6 3/7] hw/arm/virt: Introduce variable region_base " Gavin Shan
2022-10-24  3:54 ` [PATCH v6 4/7] hw/arm/virt: Introduce virt_get_high_memmap_enabled() helper Gavin Shan
2022-10-24  3:54 ` [PATCH v6 5/7] hw/arm/virt: Improve high memory region address assignment Gavin Shan
2022-10-25 16:29   ` Eric Auger
2022-10-26  0:33     ` Gavin Shan
2022-10-26 10:43       ` Cornelia Huck
2022-10-28  6:45         ` Gavin Shan
2022-10-24  3:54 ` [PATCH v6 6/7] hw/arm/virt: Add 'compact-highmem' property Gavin Shan
2022-10-25 10:30   ` Cornelia Huck [this message]
2022-10-25 16:33     ` Eric Auger
2022-10-26  3:16     ` Gavin Shan
2022-10-24  3:54 ` [PATCH v6 7/7] hw/arm/virt: Add properties to disable high memory regions Gavin Shan
2022-10-25 10:54   ` Cornelia Huck
2022-10-26  3:55     ` Gavin Shan
2022-10-26 11:10       ` Cornelia Huck
2022-10-28  6:53         ` Gavin Shan
2022-10-26  0:29 ` [PATCH v6 0/7] hw/arm/virt: Improve address assignment for " Gavin Shan
2022-10-28 18:06   ` Peter Maydell
2022-10-29 22:53     ` Gavin Shan
2022-10-29 11:29   ` Marc Zyngier
2022-10-29 22:49     ` Gavin Shan

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=877d0ofb4w.fsf@redhat.com \
    --to=cohuck@redhat.com \
    --cc=eric.auger@redhat.com \
    --cc=gshan@redhat.com \
    --cc=maz@kernel.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=shan.gavin@gmail.com \
    --cc=zhenyzha@redhat.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.