xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Bertrand Marquis <Bertrand.Marquis@arm.com>
To: Julien Grall <julien@xen.org>
Cc: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	Julien Grall <jgrall@amazon.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>,
	Julien Grall <julien@amazon.com>
Subject: Re: [PATCH] xen/arm: guest_walk: Only generate necessary offsets/masks
Date: Mon, 19 Apr 2021 07:50:10 +0000	[thread overview]
Message-ID: <6803DD6A-69C1-48A5-8633-AB9D09DC9335@arm.com> (raw)
In-Reply-To: <87889996-0dc8-f8d8-0b0f-ea68dd82e3f5@xen.org>

Hi Julien,

> On 18 Apr 2021, at 19:16, Julien Grall <julien@xen.org> wrote:
> 
> Hi Bertrand,
> 
> On 16/04/2021 17:04, Bertrand Marquis wrote:
>>> On 5 Apr 2021, at 17:20, Julien Grall <julien@xen.org> wrote:
>>> 
>>> From: Julien Grall <jgrall@amazon.com>
>>> 
>>> At the moment, we are computing offsets/masks for each level and
>>> granularity. This is a bit of waste given that we only need to
>>> know the offsets/masks for the granularity used by the guest.
>>> 
>>> All the LPAE information can easily be inferred with just the
>>> page shift for a given granularity and the level.
>>> 
>>> So rather than providing a set of helpers per granularity, we can
>>> provide a single set that takes the granularity and the level in
>>> parameters.
>>> 
>>> With the new helpers in place, we can rework guest_walk_ld() to
>>> only compute necessary information.
>>> 
>>> Signed-off-by: Julien Grall <julien@amazon.com>
>> Very nice cleanup.
> 
> I have a couple of more cleanup in that area to send. So far, we are using a completely different set of macros for Xen page-tables. I would like to introduce a new set that will just pass PAGE_SHIFT to the existing helper.
> 
> The nice part is this means it will be easier to support other page granularity if we wanted :).

That would be awesome.
Do not hesitate to ping me if you need some help.

> 
>> Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
>> Tested-by: Bertrand Marquis <bertrand.marquis@arm.com>
> 
> Thanks! I have committed the patch.
Great,

Cheers
Bertrand

> 
> Cheers,
> 
> -- 
> Julien Grall



      reply	other threads:[~2021-04-19  7:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-05 16:20 [PATCH] xen/arm: guest_walk: Only generate necessary offsets/masks Julien Grall
2021-04-15 22:32 ` Stefano Stabellini
2021-04-16 16:04 ` Bertrand Marquis
2021-04-18 18:16   ` Julien Grall
2021-04-19  7:50     ` Bertrand Marquis [this message]

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=6803DD6A-69C1-48A5-8633-AB9D09DC9335@arm.com \
    --to=bertrand.marquis@arm.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=jgrall@amazon.com \
    --cc=julien@amazon.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 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).