From: Cornelia Huck <cohuck@redhat.com>
To: Gavin Shan <gshan@redhat.com>,
eric.auger@redhat.com, qemu-arm@nongnu.org
Cc: qemu-devel@nongnu.org, maz@kernel.org, zhenyzha@redhat.com,
richard.henderson@linaro.org, peter.maydell@linaro.org,
shan.gavin@gmail.com
Subject: Re: [PATCH v3 5/5] hw/arm/virt: Add 'highmem-compact' property
Date: Thu, 29 Sep 2022 12:27:35 +0200 [thread overview]
Message-ID: <87bkqyeaqw.fsf@redhat.com> (raw)
In-Reply-To: <7656c827-58ce-85c2-87fe-e88206d6f022@redhat.com>
On Thu, Sep 29 2022, Gavin Shan <gshan@redhat.com> wrote:
> Hi Eric,
>
> On 9/28/22 10:22 PM, Eric Auger wrote:
>> On 9/22/22 01:13, Gavin Shan wrote:
>>> After the improvement to high memory region address assignment is
>>> applied, the memory layout is changed. For example, VIRT_HIGH_PCIE_MMIO
>> s/the memory layout is changed./the memory layout is changed,
>> introducing possible migration breakage.
>
> Ok, much clearer.
>
>>> memory region is enabled when the improvement is applied, but it's
>>> disabled if the improvement isn't applied.
>>>
>>> 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 -m 4G,maxmem=511G \
>>> -monitor stdio
>>>
>>> In order to keep backwords compatibility, we need to disable the
>>> optimization on machines, which is virt-7.1 or ealier than it. It
>>> means the optimization is enabled by default from virt-7.2. Besides,
>>> 'highmem-compact' property is added so that the optimization can be
>> I would rather rename the property into compact-highmem even if the vms
>> field is name highmem_compact to align with other highmem fields
>
> Ok, but I would love to know why. Note that we already have
> 'highmem=on|off'. 'highmem_compact=on|off' seems consistent
> to me.
FWIW, I initially misread 'highmem_compact' as 'highmem_compat' (and had
to re-read because I got confused). At least to me, 'compact_highmem'
has less chance of being parsed incorrectly :) (although that is
probably a personal thing.)
>
>>> explicitly enabled or disabled on all machine types by users.
>>>
>>> Signed-off-by: Gavin Shan <gshan@redhat.com>
>>> ---
>>> docs/system/arm/virt.rst | 4 ++++
>>> hw/arm/virt.c | 33 +++++++++++++++++++++++++++++++++
>>> include/hw/arm/virt.h | 2 ++
>>> 3 files changed, 39 insertions(+)
>>>
>>> diff --git a/docs/system/arm/virt.rst b/docs/system/arm/virt.rst
>>> index 20442ea2c1..f05ec2253b 100644
>>> --- a/docs/system/arm/virt.rst
>>> +++ b/docs/system/arm/virt.rst
>>> @@ -94,6 +94,10 @@ highmem
>>> address space above 32 bits. The default is ``on`` for machine types
>>> later than ``virt-2.12``.
>>>
>>> +highmem-compact
>>> + Set ``on``/``off`` to enable/disable compact space for high memory regions.
>>> + The default is ``on`` for machine types later than ``virt-7.2``
>> I think you should document what is compact layout versus legacy one,
>> both in the commit msg and maybe as a comment in a code along with the
>> comment in hw/arm/virt.c starting with 'Highmem IO Regions: '
>
> Ok, I will add this into the commit log in v4. I don't think it's necessary
> to add duplicate comment in the code. People can check the commit log for
> details if needed.
Rather explain it in this file here, maybe? I'd prefer to be able to
find out what 'compact' means without digging through the commit log.
next prev parent reply other threads:[~2022-09-29 10:33 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-21 23:13 [PATCH v3 0/5] hw/arm/virt: Improve address assignment for high memory regions Gavin Shan
2022-09-21 23:13 ` [PATCH v3 1/5] hw/arm/virt: Introduce virt_set_high_memmap() helper Gavin Shan
2022-09-28 12:09 ` Eric Auger
2022-09-29 13:48 ` Cornelia Huck
2022-09-21 23:13 ` [PATCH v3 2/5] hw/arm/virt: Rename variable size to region_size in virt_set_high_memmap() Gavin Shan
2022-10-03 8:26 ` Eric Auger
2022-09-21 23:13 ` [PATCH v3 3/5] hw/arm/virt: Introduce variable region_base " Gavin Shan
2022-09-28 12:10 ` Eric Auger
2022-09-28 23:15 ` Gavin Shan
2022-10-03 8:26 ` Eric Auger
2022-10-03 8:27 ` Eric Auger
2022-09-21 23:13 ` [PATCH v3 4/5] hw/arm/virt: Improve high memory region address assignment Gavin Shan
2022-09-28 12:51 ` Eric Auger
2022-09-28 23:37 ` Gavin Shan
2022-10-03 8:44 ` Eric Auger
2022-10-03 22:17 ` Gavin Shan
2022-10-04 7:06 ` Eric Auger
2022-09-21 23:13 ` [PATCH v3 5/5] hw/arm/virt: Add 'highmem-compact' property Gavin Shan
2022-09-28 12:22 ` Eric Auger
2022-09-28 23:49 ` Gavin Shan
2022-09-29 10:27 ` Cornelia Huck [this message]
2022-09-29 11:21 ` Gavin Shan
2022-10-03 8:49 ` Eric Auger
2022-10-03 23:50 ` Gavin Shan
2022-09-22 1:50 ` [PATCH v3 0/5] hw/arm/virt: Improve address assignment for high memory regions Zhenyu Zhang
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=87bkqyeaqw.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 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).