All of lore.kernel.org
 help / color / mirror / Atom feed
From: Henry Wang <Henry.Wang@arm.com>
To: Julien Grall <julien@xen.org>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	"sstabellini@kernel.org" <sstabellini@kernel.org>
Cc: Bertrand Marquis <Bertrand.Marquis@arm.com>,
	Wei Chen <Wei.Chen@arm.com>, Penny Zheng <Penny.Zheng@arm.com>
Subject: RE: [RFC PATCH 0/2] Introduce reserved Xenheap
Date: Mon, 28 Feb 2022 07:12:52 +0000	[thread overview]
Message-ID: <PA4PR08MB625324910ED4D40383191F9D92019@PA4PR08MB6253.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <6269ec3d-039e-d68f-771d-c5e088631410@xen.org>

Hi Julien,

Thanks very much for your time reading the series and your feedback. Please
find the inline reply below.

> -----Original Message-----
> From: Julien Grall <julien@xen.org>
> Sent: Saturday, February 26, 2022 4:09 AM
> To: Henry Wang <Henry.Wang@arm.com>; xen-devel@lists.xenproject.org;
> sstabellini@kernel.org
> Cc: Bertrand Marquis <Bertrand.Marquis@arm.com>; Wei Chen
> <Wei.Chen@arm.com>; Penny Zheng <Penny.Zheng@arm.com>
> Subject: Re: [RFC PATCH 0/2] Introduce reserved Xenheap
> 
> Hi Henry,
> 
> On 24/02/2022 01:30, Henry Wang wrote:
> > The reserved Xenheap, or statically configured Xenheap, refers to parts
> > of RAM reserved in the beginning for Xenheap. Like the static memory
> > allocation, such reserved Xenheap regions are reserved by configuration
> > in the device tree using physical address ranges.
> 
> In Xen, we have the concept of domheap and xenheap. For Arm64 and x86
> they would be the same. But for Arm32, they would be different: xenheap
> is always mapped whereas domheap is separate.
> 
> Skimming through the series, I think you want to use the region for both
> domheap and xenheap. Is that correct?

Yes I think that would be correct, for Arm32, instead of using the full
`ram_pages` as the initial value of `heap_pages`, we want to use the
region specified in the device tree. But we are confused if this is the
correct (or preferred) way for Arm32, so in this series we only
implemented the reserved heap for Arm64.

Could you please share your opinion on this? Thanks!

> 
> Furthemore, now that we are introducing more static region, it will get
> easier to overlap the regions by mistakes. I think we want to have some
> logic in Xen (or outside) to ensure that none of them overlaps. Do you
> have any plan for that?

Totally agree with this idea, but before we actually implement the code,
we would like to firstly share our thoughts on this: One option could be to
add data structures to notes down these static memory regions when the
device tree is parsed, and then we can check if they are overlapped. Over
the long term (and this long term option is currently not in our plan),
maybe we can add something in the Xen toolstack for this usage?

Also, I am wondering if the overlapping check logic should be introduced
in this series. WDYT?

> 
> >
> > This feature is useful to run Xen on Arm MPU systems, where only a
> > finite number of memory protection regions are available. The limited
> > number of protection regions places requirement on planning the use of
> > MPU protection regions and one or more MPU protection regions needs to
> > be reserved only for Xenheap.
> >
> > Therefore, this patch series is sent as RFC for comments from the
> > community. The first patch introduces the reserved Xenheap and the
> > device tree processing code. The second patch adds the implementation of
> > the reserved Xenheap pages handling in boot and heap allocator on Arm64.
> >
> > Henry Wang (2):
> >    docs, xen/arm: Introduce reserved Xenheap memory
> >    xen/arm: Handle reserved Xenheap pages in boot/heap allocator
> >
> >   docs/misc/arm/device-tree/booting.txt | 43 ++++++++++++++++++++++
> >   xen/arch/arm/bootfdt.c                | 52 +++++++++++++++++++++------
> >   xen/arch/arm/include/asm/setup.h      |  3 ++
> >   xen/arch/arm/setup.c                  | 52 +++++++++++++++++++--------
> >   4 files changed, 125 insertions(+), 25 deletions(-)
> >
> 
> --
> Julien Grall

Kind regards,

Henry

  reply	other threads:[~2022-02-28  7:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-24  1:30 [RFC PATCH 0/2] Introduce reserved Xenheap Henry Wang
2022-02-24  1:30 ` [RFC PATCH 1/2] docs, xen/arm: Introduce reserved Xenheap memory Henry Wang
2022-02-24  1:30 ` [RFC PATCH 2/2] xen/arm: Handle reserved Xenheap pages in boot/heap allocator Henry Wang
2022-02-25 20:08 ` [RFC PATCH 0/2] Introduce reserved Xenheap Julien Grall
2022-02-28  7:12   ` Henry Wang [this message]
2022-02-28 18:51     ` Julien Grall
2022-03-01  2:11       ` Henry Wang
2022-03-01  2:23         ` Wei Chen
2022-03-01 23:32           ` Stefano Stabellini
2022-03-01 13:39       ` Bertrand Marquis

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=PA4PR08MB625324910ED4D40383191F9D92019@PA4PR08MB6253.eurprd08.prod.outlook.com \
    --to=henry.wang@arm.com \
    --cc=Bertrand.Marquis@arm.com \
    --cc=Penny.Zheng@arm.com \
    --cc=Wei.Chen@arm.com \
    --cc=julien@xen.org \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.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 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.