[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] xen/arm: guest_walk: Only generate necessary offsets/masks


  • To: Julien Grall <julien@xxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Mon, 19 Apr 2021 07:50:10 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lLumaIzRwjH8iZm1aCsVPawv5Cjn3kN69UEi02oIoOw=; b=SphXLt6udT/BJI/9gx7OfQ6MXyMTDqIkiwxoRHjGbsUdzlyPQgXbzXmDpU9qvyCAA6aJO0HK/IJhDUqfz+xYjw9RQI/v7F8sAYhNTeEzisB0nesBprdmvJjljj7FsdxjFNUc7nH7mzxugTDFujEfcqBjkPZmCB+K+NQZOIg20K0zlM5ka25tzZ9E22DysIRKowUwH7cI5hvOJ91jzSv8L2eC1eCE0vR8u4LKrvBci5Q1enT3yrgwOZZwiW7DrhzcrD94Nm8UIqV+HeBi6INyOqo+MfLeF4D/WRJJM1o13WfDKq28PgqwIHfn7e+bMmrPymeVzd5RnxcCKIKt/8E2pg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FB0+81I6xuaaxtNN/m5rjLpL9Wrfrq1zHoI3my63KCxM0wD00YvPobR/EAhWFrXlsebFPfVLNtOqjfUo348QckpzS4Dtp/Xcs9960PB7lE9DDOF13x0/9JZreJtJaVfebI+U1e90l3lvGpAezFaWQUQwt9kG6VU980e36oJogxgRJbYnSWH7oDeTO9rNDuPrJVdLjqV0SjuH4tyf0lTcbDua3pEz7mk5+KGK9JwJOFR/o45oFPu4yVw9kpxlEilMjrGOKaY7OQuf68yM1CLgoS90c3Ml5RwPyQ1W4XSASFPMO2XnY5dw/H9Xf6a8nlWggJghGIo07XqvGNAG8qwbHA==
  • Authentication-results-original: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=arm.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Julien Grall <jgrall@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Julien Grall <julien@xxxxxxxxxx>
  • Delivery-date: Mon, 19 Apr 2021 07:50:51 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHXKjesiGPIh/24CEW4HMn8sjGqgKq3YAMAgANJXACAAONvgA==
  • Thread-topic: [PATCH] xen/arm: guest_walk: Only generate necessary offsets/masks

Hi Julien,

> On 18 Apr 2021, at 19:16, Julien Grall <julien@xxxxxxx> wrote:
> 
> 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 :).

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

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

Cheers
Bertrand

> 
> Cheers,
> 
> -- 
> Julien Grall




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.