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

RE: [PATCH v7 3/5] xen/arm64: mm: Introduce helpers to prepare/enable/disable the identity mapping


  • To: Julien Grall <julien@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Henry Wang <Henry.Wang@xxxxxxx>
  • Date: Mon, 17 Apr 2023 04:59:05 +0000
  • Accept-language: zh-CN, 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=kvyM8Kg5KuVKat3xlQd2xvzzWkgmOdbcC+vMlFnhZE0=; b=hN1qQWwpKffbOqWPPFCsE/kE3eduHoZQArVlRG8Qq6uMftAW1++PKzNa4tDvA07Rl42WJJsIJzy3USrubFtxwvHtgXpcS1/In3Xxa9TbFvkQuZm49a6+B+LjSEcWNAVwO4oKxzpawTXENoMR/uTjXm/LHaqC//Bv9H38SMpwj7tfyTRGROHL8euSNQcZkPKlZWNY7OiROuwUb5vC5PhdNFB5PaMVGFmkwXTg6lFElVYxPRkoKweVf4U8XugOSqxqxB4wkcqjmtTmciEla1q2at9jz6VbgzuqWjmOubeI0zwB2Gq4MsA8LRY9DZKONZtHuJjfdPGBPOAEKj7GV23YaA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g/I75oCxtchvJrylNTQXoPIw8fPRqFKGnZU19Mf5FfKk2POf/LT+4iTO+SVYug5rB4rKCQptptMtpZ+zAVrBZ8acs9vbnPxyU8GIZBdFtPLe2Q7ap9oAgObfiB9AbWfZpXqAfkbumf6VUm/c2OOHaNJEhqhaTchhaCRnoqBYJWVKAIBz3+ieXy07Dtd0cx34lZvhEkLCLvWrcCGGNzBhGUaFnVatSiF7hqEFQ/7zr9A9pJNHyBI7iYBg4TNhc6d8YEFmyq5itWCI1lSFzWxjSGUcdWKho9hHga4vlj3RgXdPgz9ogG3FIP4wrdxQj5AkdS2EiyhTl8nZDlFkxBBBjQ==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Luca Fancellu <Luca.Fancellu@xxxxxxx>, "michal.orzel@xxxxxxx" <michal.orzel@xxxxxxx>, Julien Grall <jgrall@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Mon, 17 Apr 2023 04:59:39 +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: AQHZcHBWic1Wc8S7jkeT5KQNtFjvNK8uzxTw
  • Thread-topic: [PATCH v7 3/5] xen/arm64: mm: Introduce helpers to prepare/enable/disable the identity mapping

Hi Julien,

> -----Original Message-----
> Subject: [PATCH v7 3/5] xen/arm64: mm: Introduce helpers to
> prepare/enable/disable the identity mapping
> 
> 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>

I used the test method described in my notes from patch#2, and this
patch passed the test, so:

Tested-by: Henry Wang <Henry.Wang@xxxxxxx>

Kind regards,
Henry



 


Rackspace

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