[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] xen/arm: guest_walk: Only generate necessary offsets/masks
Hi Bertrand, On 16/04/2021 17:04, Bertrand Marquis wrote: On 5 Apr 2021, at 17:20, Julien Grall <julien@xxxxxxx> wrote: From: Julien Grall <jgrall@xxxxxxxxxx> 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@xxxxxxxxxx>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@xxxxxxx> Tested-by: Bertrand Marquis <bertrand.marquis@xxxxxxx> Thanks! I have committed the patch. Cheers, -- Julien Grall
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |