[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 11/14] xen/arm64: Rework the memory layout
- To: Julien Grall <julien@xxxxxxx>
- From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
- Date: Fri, 13 Jan 2023 15:58:42 +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=clfzVTHlDVmaPbdKsxMGI5DA11N6Bv2LitzaPGgp0Js=; b=N1fMGWb2SaYEvluVNemtrlkc38nrYU7WMLkXodPz+GnTobAhK+IhUVg4cgufhbME1CjBqF+alFvVz09pcNXSrxviOHPBI7UaR9rUnZaX7n7K+Etq9aduWm+i9o2Gf+wwNnBB14+jFPWhG3FgOIGdVHeV0/M4wL1dYTOB2+wy9ShWBh2rO2lI3jo/No2xSTJLmeep9R05KgSY9FwZEUGR+9I2oT/4XGhWSb8SWLpO1s9gY4/G/c70+eQVQ3BKDuMZgV1rWGFpRbiD55cCf3/SOpSmtxwoRgkrGUC6puqs0pOfTD4yrsA3UzmenA8oVPAL2y00PKJBSbgNXLlOuzRlQw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TV9NAC+i/YRM15z50dViSHOVRC/Xl0Abg6Y7+5Gy3cXXRoX9WBcGCuOmKxJsiiDjF6uSvGkthaQ5Oier1ya2zXTnDRi5C9RPkpJykXE4fF8pgKD0YR4M7/R+u7tNrP6Juh8cbVg4ldfn5DQxxudEP8mD91assmoC7vC7sD9Q6q8r3bamgZynynWjJ0IvwemSHBcwpL2IrhHgWDnWHQIAoYIe0ejBM5okk6ubFYpThc3tDFUQ7zhqV91OxWMChCYypVaeEEmhvn+osyruw18Wdp1USPMDd/+Dk1PiVG7aS3wX3c5fKgWoxlelp5mCZDi0BjP9OuTVG/rvMt2WqWE49A==
- 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 15:59:24 +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: AQHZJzoOgS7RtMe29EyEfBRXKSrWh66cgU+A
- Thread-topic: [PATCH v4 11/14] xen/arm64: Rework the memory layout
> On 13 Jan 2023, at 10:11, Julien Grall <julien@xxxxxxx> wrote:
>
> From: Julien Grall <jgrall@xxxxxxxxxx>
>
> Xen is currently not fully compliant with the Arm Arm because it will
> switch the TTBR with the MMU on.
>
> In order to be compliant, we need to disable the MMU before
> switching the TTBR. The implication is the page-tables should
> contain an identity mapping of the code switching the TTBR.
>
> In most of the case we expect Xen to be loaded in low memory. I am aware
> of one platform (i.e AMD Seattle) where the memory start above 512GB.
> To give us some slack, consider that Xen may be loaded in the first 2TB
> of the physical address space.
>
> The memory layout is reshuffled to keep the first two slots of the zeroeth
> level free. Xen will now be loaded at (2TB + 2MB). This requires a slight
> tweak of the boot code because XEN_VIRT_START cannot be used as an
> immediate.
>
> This reshuffle will make trivial to create a 1:1 mapping when Xen is
> loaded below 2TB.
>
> Signed-off-by: Julien Grall <jgrall@xxxxxxxxxx>
> ----
Reviewed-by: Luca Fancellu <luca.fancellu@xxxxxxx>
I’ve also built for arm64 and test this patch on fvp, booting Dom0
and creating/running/destroying some guests
Tested-by: Luca Fancellu <luca.fancellu@xxxxxxx>
|