[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>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Mon, 17 Apr 2023 09:55:54 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=xen.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); 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=chtbllMr7ZTnyDLWO1/uN42rbRkqjZQuW7DSLEy2yJ0=; b=hjfI+iiKzBuK8e8nMwAa9bjMlZsjTqZCCJb9yovOPI9grraM2lBbs+7r/fuDZSerPVh8/9Tsd0yoSOoInhORZ2gtWj0RQzNPmfprtJgIqX1Y82xVxLTCa/GakpTjnW1aJ5+oWscX0ngS/lglrk3VJ2QCA9oh1ASbfzCejrg16pOSKxclMQUP7eb/C8JD8i1ydFyuI4er1uiBpi0CZ0oKRGeuuc0VjdqHk9Ik9lfXjUFjiYhwZtY+Tu7NEOfI9K+ply+cgLPFrll4sizq/xZjiDr/iAHn3moJeIUGoyXFVI7r3Q3jJwwWibOy+MP1W0m+hazrEfBEaHkbg84iNF0mew==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gIzMKriHIw1pwJXyN41W3UHHjL98WYqa3s6nR5B8ll2x4qbV1YG3Gbr5JXLqsj9lnqkh0dJyn2on467/h/lUexTiYRKTrsheunHnwehiAJ1ZRhgZxgprnh634YBOHq9H4fdFsD6WdtR2umCENjq/Osi4JpbgeXj18iYktTOddQBHl1zmzLBWXyjwIzom5cFysD9zl32Sxqanbxta5Lemp88v2IZshIDCpkwb+D7YDmHZirFUCL2/OyKgdzmyDh9uPoMEpVzA56SzMNa7DJ715X+wf/9wtLop1DLzH13mrwX7gD6YtwcR3ba5kA1HmUq06d+Bv8gvn8BOQ/+FcVsE3A==
  • Cc: <Luca.Fancellu@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 07:56:12 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 16/04/2023 16:32, Julien Grall 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: Michal Orzel <michal.orzel@xxxxxxx>

~Michal




 


Rackspace

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