xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Julien Grall <julien@xen.org>
To: Bertrand Marquis <Bertrand.Marquis@arm.com>
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: Sun, 18 Apr 2021 19:16:08 +0100	[thread overview]
Message-ID: <87889996-0dc8-f8d8-0b0f-ea68dd82e3f5@xen.org> (raw)
In-Reply-To: <964513D8-D6CD-4419-9804-CF77363B81FD@arm.com>

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 :).

> 
> Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
> Tested-by: Bertrand Marquis <bertrand.marquis@arm.com>

Thanks! I have committed the patch.

Cheers,

-- 
Julien Grall


  reply	other threads:[~2021-04-18 18:16 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 [this message]
2021-04-19  7:50     ` 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=87889996-0dc8-f8d8-0b0f-ea68dd82e3f5@xen.org \
    --to=julien@xen.org \
    --cc=Bertrand.Marquis@arm.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=jgrall@amazon.com \
    --cc=julien@amazon.com \
    --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).