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

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



Hi Henry,

On 28/01/2023 04:54, Henry Wang wrote:
-----Original Message-----
Subject: [PATCH v5 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>
With some nits below that can definitely be fixed on commit.

I need to resend a new version of this patch. So I will fix them at the same time and...


Tested on FVP in Arm64 mode, so:
Tested-by: Henry Wang <Henry.Wang@xxxxxxx>

.. didn't keep these tags.

Cheers,

--
Julien Grall



 


Rackspace

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