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

Re: [PATCH v4 12/14] xen/arm64: mm: Introduce helpers to prepare/enable/disable the identity mapping


  • To: Julien Grall <julien@xxxxxxx>
  • From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • Date: Fri, 13 Jan 2023 16:26:16 +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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=AaFig45RHzspCsEkQFelcF4LE8EvQLogngsVM32N+RU=; b=KEywhFIONAWXj70Q6Nx3tGmnZsaSGG36RF8pW/lx6lGWHuWWWJ6mUpBs3z/Ysrt1Zu+H5pZs3fsonhmnXUAizSFbKkUP8dKj9xRkpKb9C3/CnBY65qYx8yHP811wfr99dFLf3WDJFQlrPmafwDYWL/7uVgjhMmW0/nOeE5VsJvuuRWWP0YU7l+OB+LInzjwY4TRtaOTcjgACmB7Nl76ZH7pkLm7XwNEW6OtHWwZ4BAcACpRCQSrFu4JuR7sYbw2w/wAVssCiGejkXGi/0cFQWR9B0nnLMGS4I5wXvjnJIK5ldRKlrA6UUHr9MaTjodjYmc5FYu+zkk/QRstcfnwgxw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B/9kuoAUBPzFWSuSHK5+v7PW64sjuKqyfPdSzJRaRKQ1z6buN9nQawkvFBg4FqFBigtysuhG3uFMMx98mjvZTCwue3yaQ2O4h0/MF57MR+XVL9eQ4s9jSqdsUDtrnSp4yiQN/wfydGGQXy12ZBPSRzqcMrMW2xPgW20Ajp2hhzLtWO2743QFupILR/cRPP7SvoPZYioslGoigo6C98xkigsV53GgTgc5JxhMWljmYSzsj4ZU1THHVQCOI1U422kC++uFWWNKMG5aM7zyO9pPYkAHUoW0Zq4PVOj//YXz9uyh4zdkAuLieylsXtsQIdzeBDwbQbxJRFk7F15WO6y8Og==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Julien Grall <jgrall@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Fri, 13 Jan 2023 16:26:46 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHZJzoTvCUimx3Q2EmG6peGw8mIYK6ciQOA
  • Thread-topic: [PATCH v4 12/14] xen/arm64: mm: Introduce helpers to prepare/enable/disable the identity mapping


> On 13 Jan 2023, at 10:11, Julien Grall <julien@xxxxxxx> wrote:
> 
> From: Julien Grall <jgrall@xxxxxxxxxx>
> 
> In follow-up patches we will need to have part of Xen identity mapped in
> order to safely switch the TTBR.
> 
> On some platform, the identity mapping may have to start at 0. If we always
> keep the identity region mapped, NULL pointer dereference would lead to
> access to valid mapping.
> 
> It would be possible to relocate Xen to avoid clashing with address 0.
> However the identity mapping is only meant to be used in very limited
> places. Therefore it would be better to keep the identity region invalid
> for most of the time.
> 
> Two new external helpers are introduced:
>    - arch_setup_page_tables() will setup the page-tables so it is
>      easy to create the mapping afterwards.
>    - update_identity_mapping() will create/remove the identity mapping
> 
> Signed-off-by: Julien Grall <jgrall@xxxxxxxxxx>
> 
> ----

Reviewed-by: Luca Fancellu <luca.fancellu@xxxxxxx>

I’ve also built for arm32/64 and test this patch on fvp, booting Dom0
and creating/running/destroying some guests

Tested-by: Luca Fancellu <luca.fancellu@xxxxxxx>




 


Rackspace

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