Hi Julien,

> On 18 Apr 2021, at 19:16, Julien Grall <jul...@xen.org> wrote:
> 
> Hi Bertrand,
> 
> On 16/04/2021 17:04, Bertrand Marquis wrote:
>>> On 5 Apr 2021, at 17:20, Julien Grall <jul...@xen.org> wrote:
>>> 
>>> From: Julien Grall <jgr...@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 <jul...@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.marq...@arm.com>
>> Tested-by: Bertrand Marquis <bertrand.marq...@arm.com>
> 
> Thanks! I have committed the patch.
Great,

Cheers
Bertrand

> 
> Cheers,
> 
> -- 
> Julien Grall


Reply via email to