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

Re: [PATCH v1 2/2] xen/arm: Enlarge identity map space to 127TiB


  • To: "leo.yan@xxxxxxxxxx" <leo.yan@xxxxxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Mon, 4 Sep 2023 13:55:12 +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=N9sJABUIlpmpXiKQpuaGlgUW15tWjkX/1AIiQ/CZppA=; b=YXdmNQN0HnBbaFQsSlGNxJ+oB98jb6HXeaVutSOowXWZSzhVWZPhSB5DZdKJd6My6yRZz4evEycYcLPTwKB+rp+SWnlqkqpKIkHz+i7vN41zMWETAKz7wced0Zvw5AxD3TaLqfR+Ps4s90gEbjguxaWze399s4GQjvseUL67RC0clNV4mKTQE2pnOATeSWb2K+Tuan/vs4zueMYuomavJpRjTRcX58y6v2h/fs5Zj+Aq4afy1iAuOuDRqNUsO2YaOuseiTGns33uUcILzRi+FM49dXaP25WAhrXs7kCI1pgwuhFWwXxqMmFbsgYjZexCDql9E9PG8DTNbRTVv87sSQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bLRxaiz/8iX6aZNLzWAd1SEmdXGDhCuApSAv/Lxdcr9PC+g05+7qVgZBZ3IKCqrS2ssRqqgg+9WPs99XwQ6RmY5Kt8wsHZhyokDYtFOiiNZ2SpPz0gDZxfoVwUoKm+ZNLSfcYNO3JxUxkpZ3mONPErQuNKmOywclRBpjvgezor7645oAPdllQvdlex7lxPGMJVC6P7CfAtY+w59g+HptgjqNGNRokYx6y0SaEHASz9zZ02p9/NoAg3ROV7lNu+seB8qTAqjl3T6eVTrp/+B+Mpuzklhf23X9JjuWJNVr9542RPiDZ2HVpXvNbRt5ieb0RXBWuhn+wRac5K6547EEwA==
  • 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>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Alexey Klimov <alexey.klimov@xxxxxxxxxx>
  • Delivery-date: Mon, 04 Sep 2023 13:55:45 +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: AQHZ2/qDuICFuFkYAUiWEvnuJknicbAKttaA
  • Thread-topic: [PATCH v1 2/2] xen/arm: Enlarge identity map space to 127TiB

Hi Leo,

> On 31 Aug 2023, at 13:01, Leo Yan <leo.yan@xxxxxxxxxx> wrote:
> 
> On some platforms, the memory regions could be:
> 
>  (XEN) MODULE[0]: 00000807f6df0000 - 00000807f6f3e000 Xen
>  (XEN) MODULE[1]: 00000807f8054000 - 00000807f8056000 Device Tree
>  (XEN) MODULE[2]: 00000000fa834000 - 00000000fc5de1d5 Ramdisk
>  (XEN) MODULE[3]: 00000000fc5df000 - 00000000ffb3f810 Kernel
> 
> In this case, the Xen binary is loaded above 2TB, so Xen fails to boot
> up due to the out of the identity map space.
> 
> This patch enlarges identity map space to 127TiB, which can support the
> memory space [0x0 .. 0x00007eff_ffff_ffff], thus it has flexibility for
> support different platforms.
> 
> Fixes: 1c78d76b67 ("xen/arm64: mm: Introduce helpers to 
> prepare/enable/disable")
> Reported-by: Alexey Klimov <alexey.klimov@xxxxxxxxxx>
> Signed-off-by: Leo Yan <leo.yan@xxxxxxxxxx>

This is not based on the current status of staging where this part of the
code was modified.

Currently Xen virtual address is at 2TB and the extension you are making
will potentially make it possible to load Xen at 2TB which will clash for the
identity mapping handling in Xen.

Please rebase on the latest staging and check there how you can do as
this patch if rebased on staging right now with rightfully end in a compilation
error.

Cheers
Bertrand

> ---
> xen/arch/arm/include/asm/config.h | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
> 
> diff --git a/xen/arch/arm/include/asm/config.h 
> b/xen/arch/arm/include/asm/config.h
> index 21f4e68a40..3e97c95b57 100644
> --- a/xen/arch/arm/include/asm/config.h
> +++ b/xen/arch/arm/include/asm/config.h
> @@ -87,11 +87,11 @@
>  *   2G -   4G   Domheap: on-demand-mapped
>  *
>  * ARM64 layout:
> - * 0x0000000000000000 - 0x000001ffffffffff (2TB, L0 slots [0..3])
> + * 0x0000000000000000 - 0x00007effffffffff (127TB, L0 slots [0..253])
>  *
>  *  Reserved to identity map Xen
>  *
> - * 0x0000020000000000 - 0x0000027fffffffff (512GB, L0 slot [4])
> + * 0x000007f000000000 - 0x00007fffffffffff (1TB, L0 slot [254..255])
>  *  (Relative offsets)
>  *   0  -   2M   Unmapped
>  *   2M -  10M   Xen text, data, bss
> @@ -103,9 +103,6 @@
>  *
>  *  32G -  64G   Frametable: 56 bytes per page for 2TB of RAM
>  *
> - * 0x0000028000000000 - 0x00007fffffffffff (125TB, L0 slots [5..255])
> - *  Unused
> - *
>  * 0x0000800000000000 - 0x000084ffffffffff (5TB, L0 slots [256..265])
>  *  1:1 mapping of RAM
>  *
> @@ -117,7 +114,7 @@
> #define XEN_VIRT_START          _AT(vaddr_t, MB(2))
> #else
> 
> -#define IDENTITY_MAPPING_AREA_NR_L0 4
> +#define IDENTITY_MAPPING_AREA_NR_L0 254
> #define XEN_VM_MAPPING SLOT0(IDENTITY_MAPPING_AREA_NR_L0)
> 
> #define SLOT0_ENTRY_BITS  39
> -- 
> 2.39.2
> 




 


Rackspace

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