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

RE: [PATCH v6 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: Thu, 2 Mar 2023 15:15:15 +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=idiMTzR8fE+4OlQEbFAVvxCG/Mgx4+pKnDPFgk1G1+M=; b=TR9kZBZ+fLx1Y2iq6qZ8PSScqOcqG4sWl83QAe0dmGqF6k3Gkb7Up9zkgKu91Vlig9Ft7PJBtUKQOXO+MK3tsrNJ16gr5P33Q48WEzWQzn6A8PHE9sK4Ve5eN7Lwr9PP10yw6y2WlNQOQasbbwtEEXWWBxK2vQAM9Zq3qDxWDW/FdSTnjx2nscQC4X61+3jNZwfMJ4EmcPVmLS7jfDETKenQi0RAOQKiJ1oYqutPWLK0qOE5UK6xH9WiQVt9IdAXuiD+qHJBo5Txrs8NlBCE4082cOetHq6Ay6wPiD6C/1+57i6DyX7G+dPV2jU06qJtXJKwqmfUVMtdKXzMUUZrXA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I5pvbFLRN7EpE6qk+6a39zYazuEm+3cz718ucu/DZOFCc6U1IA6K2WJZrH7ur6W2Bn1UdRKfyTHchprMl5MnVclBtyBWQUDAHtAmTbMthuPjcZ8DLSfID9n3KMGR3+5oO2h4YEuTIoZj4R3EB0gn/kIJ9BWcjByV3IVoWAwK2FcmqAd9tcB9H/vTZsMDwnZmX+zxrae/Z47uahOYhiqfVU7Zj5rEXvVCYrgLyXGfzHDWkmj/B3J3kxUcOe9LTBYvgLdYIlZQkJjlSlPd4UeaE7ixznEMY5SRtOVcXN7QRVYAacyXO4Z1RI/QZVMSfr8XjDH3yGKC1sAUxlBLUeYZxA==
  • 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>
  • Delivery-date: Thu, 02 Mar 2023 15:15:47 +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: AQHZTRejuKIFgfvPuUGgSC/MIV1QK67nmTVw
  • Thread-topic: [PATCH v6 3/5] xen/arm64: mm: Introduce helpers to prepare/enable/disable the identity mapping

Hi Julien,

> -----Original Message-----
> Subject: [PATCH v6 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>

Reviewed-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®.