xen/arm: Enlarge identity map space
v4 cover xen/arm: Enlarge identity map space
The latest Xen fails to boot on ADLink AVA platform. Alexey Klimov root caused the issue is related with the commit 1c78d76b67 ("xen/arm64: mm:
Introduce helpers to prepare/enable/disable").
This is because on ADLink AVA platform, it loads Xen hypervisor to the address above 8TB and hence causes Xen panic (see patch 02 for details).
To fix this issue, this series is to enlarge identity map space to 10TB.
Note, I did a smoke test for this patch set, but we have no chance to test it on the AVA board which reported the issue since the board is bricked now. And it's likely we don't need this patch set anymore after updating firmware on the AVA machine.
Hope this patch set can be helpful for the system with big memory, I'd leave the judgement to maintainers for picking it or not.
Changes from v3:
- Changed the identity map space from 127TB to 10TB (Julien Grall).
Changes from v2:
- Kept macro naming IDENTITY_MAPPING_AREA_NR_L0 and removed introduced macros (Julien Grall).
- Minor improvement for coding style (Julien Grall).
- Added platform's detail in the patch 02 commit log (Julien Grall).
Changes from v1:
- Rebased on staging branch (Bertrand);
- Added Alexey Klimov tested tag for patch 01 (Alexey).
- Corrected the printing log with dynamically calculation ID map size.
Leo Yan (2):
xen/arm: Add macro XEN_VM_MAPPING
xen/arm: Enlarge identity map space to 10TB
xen/arch/arm/arm64/mm.c | 6 ++++-- xen/arch/arm/include/asm/mmu/layout.h | 17 +++++++++-------- 2 files changed, 13 insertions(+), 10 deletions(-)
Signature · 1 line
2.39.2
PATCH v4 1/2 xen/arm: Add macro XEN_VM_MAPPING
Xen maps the virtual memory space starting from L0 slot 4, so it's open coded for macros with the offset '4'.
For more readable, add a new macro XEN_VM_MAPPING which defines the start slot for Xen virtual memory mapping, and all virtual memory regions are defined based on it.
--- xen/arch/arm/include/asm/mmu/layout.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
xen/arch/arm/include/asm/mmu/layout.h +6 -5
@@ -49,11 +49,14 @@#define XEN_VIRT_START _AT(vaddr_t, MB(2))#else +#define IDENTITY_MAPPING_AREA_NR_L0 4 +#define XEN_VM_MAPPING SLOT0(IDENTITY_MAPPING_AREA_NR_L0) +#define SLOT0_ENTRY_BITS 39#define SLOT0 (slot) (_AT(vaddr_t,slot) << SLOT0_ENTRY_BITS)#define SLOT0_ENTRY_SIZE SLOT0(1) -#define XEN_VIRT_START (SLOT0(4) + _AT(vaddr_t, MB(2))) +#define XEN_VIRT_START (XEN_VM_MAPPING + _AT(vaddr_t, MB(2)))#endif /*
@@ -116,12 +119,10 @@#else /* ARM_64 */ -#define IDENTITY_MAPPING_AREA_NR_L0 4 - -#define VMAP_VIRT_START (SLOT0(4) + GB(1)) +#define VMAP_VIRT_START (XEN_VM_MAPPING + GB(1))#define VMAP_VIRT_SIZE GB(1) -#define FRAMETABLE_VIRT_START (SLOT0(4) + GB(32)) +#define FRAMETABLE_VIRT_START (XEN_VM_MAPPING + GB(32))#define FRAMETABLE_SIZE GB(32)#define FRAMETABLE_NR (FRAMETABLE_SIZE / sizeof(*frame_table))
Signature · 1 line
2.39.2
PATCH v4 2/2 xen/arm: Enlarge identity map space to 10TB
In reply to Leo YanOn ADLink AVA platform (Ampere Altra SoC with 32 Arm Neoverse N1 cores), the physical memory regions are:
DRAM memory regions:
Node[0] Region[0]: 0x000080000000 - 0x0000ffffffff
Node[0] Region[1]: 0x080000000000 - 0x08007fffffff
Node[0] Region[2]: 0x080100000000 - 0x0807ffffffffThe UEFI loads Xen hypervisor and DTB into the high memory, the kernel and ramdisk images are loaded into the low memory space:
(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 8TB, which exceeds the maximum supported identity map space of 2TB in Xen. Consequently, the system fails to boot.
This patch enlarges identity map space to 10TB, allowing module loading within the range of [0x0 .. 0x000009ff_ffff_ffff].
--- xen/arch/arm/arm64/mm.c | 6 ++++-- xen/arch/arm/include/asm/mmu/layout.h | 8 ++++---- 2 files changed, 8 insertions(+), 6 deletions(-)
xen/arch/arm/arm64/mm.c +4 -2
@@ -41,7 +41,8 @@ static void __init prepare_boot_identity_mapping(void)clear_page (boot_third_id);if ( id_offsets[0 ] >=IDENTITY_MAPPING_AREA_NR_L0 ) -panic ("Cannot handle ID mapping above 2TB\n" ); +panic ("Cannot handle ID mapping above %uTB\n" , +IDENTITY_MAPPING_AREA_NR_L0 >>1 );/* Link first ID table */ pte =mfn_to_xen_entry (virt_to_mfn (boot_first_id),MT_NORMAL );
@@ -74,7 +75,8 @@ static void __init prepare_runtime_identity_mapping(void)DECLARE_OFFSETS (id_offsets, id_addr);if ( id_offsets[0 ] >=IDENTITY_MAPPING_AREA_NR_L0 ) -panic ("Cannot handle ID mapping above 2TB\n" ); +panic ("Cannot handle ID mapping above %uTB\n" , +IDENTITY_MAPPING_AREA_NR_L0 >>1 );/* Link first ID table */ pte =pte_of_xenaddr ((vaddr_t )xen_first_id);
xen/arch/arm/include/asm/mmu/layout.h +4 -4
@@ -19,11 +19,11 @@* 2G - 4G Domheap: on-demand-mapped * * ARM64 layout: -* 0x0000000000000000 - 0x000001ffffffffff (2TB, L0 slots [0..3]) +* 0x0000000000000000 - 0x000009ffffffffff (10TB, L0 slots [0..19]) * * Reserved to identity map Xen * -* 0x0000020000000000 - 0x0000027fffffffff (512GB, L0 slot [4]) +* 0x00000a0000000000 - 0x00000a7fffffffff (512GB, L0 slot [20]) * (Relative offsets) * 0 - 2M Unmapped * 2M - 10M Xen text, data, bss
@@ -35,7 +35,7 @@* * 32G - 64G Frametable: 56 bytes per page for 2TB of RAM * -* 0x0000028000000000 - 0x00007fffffffffff (125TB, L0 slots [5..255]) +* 0x00000a8000000000 - 0x00007fffffffffff (512GB+117TB, L0 slots [21..255]) * Unused * * 0x0000800000000000 - 0x000084ffffffffff (5TB, L0 slots [256..265])
@@ -49,7 +49,7 @@#define XEN_VIRT_START _AT(vaddr_t, MB(2))#else -#define IDENTITY_MAPPING_AREA_NR_L0 4 +#define IDENTITY_MAPPING_AREA_NR_L0 20#define XEN_VM_MAPPING SLOT0(IDENTITY_MAPPING_AREA_NR_L0)#define SLOT0_ENTRY_BITS 39
Signature · 1 line
2.39.2
Re: [PATCH v4 2/2] xen/arm: Enlarge identity map space to 10TB
Hi,
Quoted 18 lines · Leo Yan
On ADLink AVA platform (Ampere Altra SoC with 32 Arm Neoverse N1 cores), the physical memory regions are:
DRAM memory regions:
Node[0] Region[0]: 0x000080000000 - 0x0000ffffffff Node[0] Region[1]: 0x080000000000 - 0x08007fffffff Node[0] Region[2]: 0x080100000000 - 0x0807ffffffffThe UEFI loads Xen hypervisor and DTB into the high memory, the kernel and ramdisk images are loaded into the low memory space:
(XEN) MODULE[0]:
00000807f6df0000-00000807f6f3e000Xen (XEN) MODULE[1]:00000807f8054000-00000807f8056000Device Tree (XEN) MODULE[2]:00000000fa834000-00000000fc5de1d5Ramdisk (XEN) MODULE[3]:00000000fc5df000-00000000ffb3f810Kernel
Quoted 8 lines
In this case, the Xen binary is loaded above 8TB, which exceeds the maximum supported identity map space of 2TB in Xen. Consequently, the system fails to boot.
This patch enlarges identity map space to 10TB, allowing module loading within the range of [
0x0.. 0x000009ff_ffff_ffff].Fixes 1c78d76b67 ("xen/arm64: mm: Introduce helpers to prepare/enable/disable")
I don't think a fixes tag applies here given that 2TB was just a number we believed is enough and all of this is platform dependent. This can be dropped on commit if committer agrees.
Quoted 2 lines
Reported-by Alexey Klimov <[email protected]>Signed-off-by Leo Yan <[email protected]>
~Michal
Re: [PATCH v4 2/2] xen/arm: Enlarge identity map space to 10TB
Quoted 1 line · Michal Orzel
Hi,
Hi,
Quoted 23 lines · Leo Yan
Quoted 22 lines
On ADLink AVA platform (Ampere Altra SoC with 32 Arm Neoverse N1 cores), the physical memory regions are:
DRAM memory regions: Node[0] Region[0]: 0x000080000000 - 0x0000ffffffff Node[0] Region[1]: 0x080000000000 - 0x08007fffffff Node[0] Region[2]: 0x080100000000 - 0x0807ffffffffThe UEFI loads Xen hypervisor and DTB into the high memory, the kernel and ramdisk images are loaded into the low memory space:
(XEN) MODULE[0]: 00000807f6df0000 - 00000807f6f3e000 Xen (XEN) MODULE[1]: 00000807f8054000 - 00000807f8056000 Device Tree (XEN) MODULE[2]: 00000000fa834000 - 00000000fc5de1d5 Ramdisk (XEN) MODULE[3]: 00000000fc5df000 - 00000000ffb3f810 KernelIn this case, the Xen binary is loaded above 8TB, which exceeds the maximum supported identity map space of 2TB in Xen. Consequently, the system fails to boot.
Quoted 7 lines
Quoted 4 lines
This patch enlarges identity map space to 10TB, allowing module loading within the range of [
0x0.. 0x000009ff_ffff_ffff].Fixes 1c78d76b67 ("xen/arm64: mm: Introduce helpers to prepare/enable/disable")I don't think a fixes tag applies here given that 2TB was just a number we believed is enough and all of this is platform dependent.
This can be dropped on commit if committer agrees
Xen may have booted on that platform before hand. So this would be considered a regression and therefore a tag would be warrant.
AFAICT, the commit is only present on the upcoming 4.18. So the question is whether Xen 4.17 booted out-of-the-box on ADLink? If the answer is yes, then we need to add a Fixes tag. But the correct one would be
1c78d76b67e1 ("xen/arm64: mm: Introduce helpers to prepare/enable/disable the identity mapping").
We would also need to consider it as a candidate for Xen 4.18 because we would regress boot on ADLink.
Cheers,
Signature · 1 line
Julien Grall
Re: [PATCH v4 2/2] xen/arm: Enlarge identity map space to 10TB
Hi
+Luca and Rahul
Quoted 35 lines · Julien Grall
Quoted 1 line · Michal Orzel
Hi,
Hi,
Quoted 26 lines · Leo Yan
Quoted 25 lines
On ADLink AVA platform (Ampere Altra SoC with 32 Arm Neoverse N1 cores), the physical memory regions are:
DRAM memory regions:
Node[0] Region[0]: 0x000080000000 - 0x0000ffffffff Node[0] Region[1]: 0x080000000000 - 0x08007fffffff Node[0] Region[2]: 0x080100000000 - 0x0807ffffffffThe UEFI loads Xen hypervisor and DTB into the high memory, the kernel and ramdisk images are loaded into the low memory space:
(XEN) MODULE[0]:
00000807f6df0000-00000807f6f3e000Xen (XEN) MODULE[1]:00000807f8054000-00000807f8056000Device Tree (XEN) MODULE[2]:00000000fa834000-00000000fc5de1d5Ramdisk (XEN) MODULE[3]:00000000fc5df000-00000000ffb3f810KernelIn this case, the Xen binary is loaded above 8TB, which exceeds the maximum supported identity map space of 2TB in Xen. Consequently, the system fails to boot.
This patch enlarges identity map space to 10TB, allowing module loading within the range of [
0x0.. 0x000009ff_ffff_ffff].
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
Fixes 1c78d76b67 ("xen/arm64: mm: Introduce helpers to prepare/enable/disable")I don't think a fixes tag applies here given that 2TB was just a number we believed is enough and all of this is platform dependent.
This can be dropped on commit if committer agreesXen may have booted on that platform before hand. So this would be considered a regression and therefore a tag would be warrant.
AFAICT, the commit is only present on the upcoming 4.18. So the question is whether Xen 4.17 booted out-of-the-box on ADLink? If the answer is yes, then we need to add a Fixes tag. But the correct one would be
@Rahul or Luca: could you give an answer here ?
I know you used Xen on an AVA platform but was it booting out of the box ?
Quoted 3 lines
1c78d76b67e1 ("xen/arm64: mm: Introduce helpers to prepare/enable/disable the identity mapping").
We would also need to consider it as a candidate for Xen 4.18 because we would regress boot on ADLink.
Ack
Cheers
Bertrand
Quoted 5 lines
Cheers,
Signature · 1 line
Julien Grall
Re: [PATCH v4 2/2] xen/arm: Enlarge identity map space to 10TB
Quoted 47 lines · Bertrand Marquis
Hi
+Luca and Rahul
Quoted 39 lines · Julien Grall
Quoted 1 line · Michal Orzel
Hi,
Hi,
Quoted 30 lines · Leo Yan
Quoted 18 lines
On ADLink AVA platform (Ampere Altra SoC with 32 Arm Neoverse N1 cores), the physical memory regions are:
DRAM memory regions:
Node[0] Region[0]: 0x000080000000 - 0x0000ffffffff Node[0] Region[1]: 0x080000000000 - 0x08007fffffff Node[0] Region[2]: 0x080100000000 - 0x0807ffffffffThe UEFI loads Xen hypervisor and DTB into the high memory, the kernel and ramdisk images are loaded into the low memory space:
(XEN) MODULE[0]:
00000807f6df0000-00000807f6f3e000Xen (XEN) MODULE[1]:00000807f8054000-00000807f8056000Device Tree (XEN) MODULE[2]:00000000fa834000-00000000fc5de1d5Ramdisk (XEN) MODULE[3]:00000000fc5df000-00000000ffb3f810KernelQuoted 8 lines
In this case, the Xen binary is loaded above 8TB, which exceeds the maximum supported identity map space of 2TB in Xen. Consequently, the system fails to boot.
This patch enlarges identity map space to 10TB, allowing module loading within the range of [
0x0.. 0x000009ff_ffff_ffff].Fixes 1c78d76b67 ("xen/arm64: mm: Introduce helpers to prepare/enable/disable")I don't think a fixes tag applies here given that 2TB was just a number we believed is enough and all of this is platform dependent.
This can be dropped on commit if committer agrees
Quoted 7 lines
Quoted 4 lines
Xen may have booted on that platform before hand. So this would be considered a regression and therefore a tag would be warrant.
AFAICT, the commit is only present on the upcoming 4.18. So the question is whether Xen 4.17 booted out-of-the-box on ADLink? If the answer is yes, then we need to add a Fixes tag. But the correct one would be
@Rahul or Luca: could you give an answer here ?
I know you used Xen on an AVA platform but was it booting out of the box ?
I can’t say for Xen 4.17, but our nightly job has run successfully on AVA for the commit 730406ab81094115d9fb5ca00ba8d53cec1279b3 (docs/misra: add deviations.rst to document additional deviations.)
We are not applying any patch for it to run on AVA.
Quoted 17 lines
Quoted 4 lines
1c78d76b67e1 ("xen/arm64: mm: Introduce helpers to prepare/enable/disable the identity mapping").
We would also need to consider it as a candidate for Xen 4.18 because we would regress boot on ADLink.
Ack
Cheers
BertrandQuoted 5 lines
Cheers,
--
Julien Grall
Re: [PATCH v4 2/2] xen/arm: Enlarge identity map space to 10TB
Quoted 53 lines · Luca Fancellu
Quoted 53 lines · Bertrand Marquis
Hi
+Luca and Rahul
Quoted 43 lines · Julien Grall
Quoted 1 line · Michal Orzel
Hi,
Hi,
Quoted 23 lines · Leo Yan
Quoted 22 lines
On ADLink AVA platform (Ampere Altra SoC with 32 Arm Neoverse N1 cores), the physical memory regions are:
DRAM memory regions:
Node[0] Region[0]: 0x000080000000 - 0x0000ffffffff Node[0] Region[1]: 0x080000000000 - 0x08007fffffff Node[0] Region[2]: 0x080100000000 - 0x0807ffffffffThe UEFI loads Xen hypervisor and DTB into the high memory, the kernel and ramdisk images are loaded into the low memory space:
(XEN) MODULE[0]:
00000807f6df0000-00000807f6f3e000Xen (XEN) MODULE[1]:00000807f8054000-00000807f8056000Device Tree (XEN) MODULE[2]:00000000fa834000-00000000fc5de1d5Ramdisk (XEN) MODULE[3]:00000000fc5df000-00000000ffb3f810KernelIn this case, the Xen binary is loaded above 8TB, which exceeds the maximum supported identity map space of 2TB in Xen. Consequently, the system fails to boot.
Quoted 7 lines
Quoted 4 lines
This patch enlarges identity map space to 10TB, allowing module loading within the range of [
0x0.. 0x000009ff_ffff_ffff].Fixes 1c78d76b67 ("xen/arm64: mm: Introduce helpers to prepare/enable/disable")I don't think a fixes tag applies here given that 2TB was just a number we believed is enough and all of this is platform dependent.
This can be dropped on commit if committer agreesXen may have booted on that platform before hand. So this would be considered a regression and therefore a tag would be warrant.
AFAICT, the commit is only present on the upcoming 4.18. So the question is whether Xen 4.17 booted out-of-the-box on ADLink? If the answer is yes, then we need to add a Fixes tag. But the correct one would be
Quoted 7 lines
Quoted 2 lines
@Rahul or Luca: could you give an answer here ?
I know you used Xen on an AVA platform but was it booting out of the box ?I can’t say for Xen 4.17, but our nightly job has run successfully on AVA for the commit
730406ab81094115d9fb5ca00ba8d53cec1279b3(docs/misra: adddeviations.rstto document additional deviations.)We are not applying any patch for it to run on AVA.
Most likely it is because your UEFI/BIOS firmware is 2.x, for instance 2.04.100.07.
This fix if for AVA machine with older UEFI firmware 1.07.300.03.
Best regards,
Alexey
Re: [PATCH v4 2/2] xen/arm: Enlarge identity map space to 10TB
Quoted 4 lines
Quoted 4 lines
Quoted 3 lines
@Rahul or Luca: could you give an answer here ?
I know you used Xen on an AVA platform but was it booting out of the box ?
Quoted 8 lines
Quoted 4 lines
I can’t say for Xen 4.17, but our nightly job has run successfully on AVA for the commit
730406ab81094115d9fb5ca00ba8d53cec1279b3(docs/misra: adddeviations.rstto document additional deviations.)We are not applying any patch for it to run on AVA.
Most likely it is because your UEFI/BIOS firmware is 2.x, for instance 2.04.100.07.
This fix if for AVA machine with older UEFI firmware 1.07.300.03.
Yes indeed, all our AVA have a newer firmware, so I’m afraid we can’t check
Cheers,
Luca
Re: [PATCH v4 2/2] xen/arm: Enlarge identity map space to 10TB
In reply to Alexey KlimovCC Henry
Hi Alexey,
Quoted 57 lines · Alexey Klimov
Quoted 56 lines · Luca Fancellu
Quoted 55 lines · Bertrand Marquis
Hi
+Luca and Rahul
Quoted 35 lines · Julien Grall
Quoted 1 line · Michal Orzel
Hi,
Hi,
Quoted 26 lines · Leo Yan
Quoted 25 lines
On ADLink AVA platform (Ampere Altra SoC with 32 Arm Neoverse N1 cores), the physical memory regions are:
DRAM memory regions:
Node[0] Region[0]: 0x000080000000 - 0x0000ffffffff Node[0] Region[1]: 0x080000000000 - 0x08007fffffff Node[0] Region[2]: 0x080100000000 - 0x0807ffffffffThe UEFI loads Xen hypervisor and DTB into the high memory, the kernel and ramdisk images are loaded into the low memory space:
(XEN) MODULE[0]:
00000807f6df0000-00000807f6f3e000Xen (XEN) MODULE[1]:00000807f8054000-00000807f8056000Device Tree (XEN) MODULE[2]:00000000fa834000-00000000fc5de1d5Ramdisk (XEN) MODULE[3]:00000000fc5df000-00000000ffb3f810KernelIn this case, the Xen binary is loaded above 8TB, which exceeds the maximum supported identity map space of 2TB in Xen. Consequently, the system fails to boot.
This patch enlarges identity map space to 10TB, allowing module loading within the range of [
0x0.. 0x000009ff_ffff_ffff].Quoted 8 lines
Quoted 4 lines
Quoted 1 line
Fixes 1c78d76b67 ("xen/arm64: mm: Introduce helpers to prepare/enable/disable")I don't think a fixes tag applies here given that 2TB was just a number we believed is enough and all of this is platform dependent.
This can be dropped on commit if committer agreesXen may have booted on that platform before hand. So this would be considered a regression and therefore a tag would be warrant.
AFAICT, the commit is only present on the upcoming 4.18. So the question is whether Xen 4.17 booted out-of-the-box on ADLink? If the answer is yes, then we need to add a Fixes tag. But the correct one would be
@Rahul or Luca: could you give an answer here ?
I know you used Xen on an AVA platform but was it booting out of the box ?
Quoted 8 lines
Quoted 4 lines
I can’t say for Xen 4.17, but our nightly job has run successfully on AVA for the commit
730406ab81094115d9fb5ca00ba8d53cec1279b3(docs/misra: adddeviations.rstto document additional deviations.)We are not applying any patch for it to run on AVA.
Most likely it is because your UEFI/BIOS firmware is 2.x, for instance 2.04.100.07.
This fix if for AVA machine with older UEFI firmware 1.07.300.03.
OOI, why not updating your firmware? I was expecting that it would also contain other critical fixes.
With this in mind, I am now more in two mind to ask to merge this patch in Xen 4.18. On one hand, I understand it will help to boot on AVA machine with an older firmware. But on the other hand this is changing the memory layout quite late in the release. The risk seems limited because Xen is not loaded at the top of the virtual address space (there is the directmap afterwards).
Henry (as the release manager) and others, any opinions?
Cheers,
Signature · 1 line
Julien Grall
Re: [PATCH v4 2/2] xen/arm: Enlarge identity map space to 10TB
Hi,
Quoted 72 lines · Julien Grall
CC Henry
Hi Alexey,
Quoted 57 lines · Alexey Klimov
Quoted 56 lines · Luca Fancellu
Quoted 55 lines · Bertrand Marquis
Hi
+Luca and Rahul
Quoted 35 lines · Julien Grall
Quoted 1 line · Michal Orzel
Hi,
Hi,
Quoted 26 lines · Leo Yan
Quoted 25 lines
On ADLink AVA platform (Ampere Altra SoC with 32 Arm Neoverse N1 cores), the physical memory regions are:
DRAM memory regions:
Node[0] Region[0]: 0x000080000000 - 0x0000ffffffff Node[0] Region[1]: 0x080000000000 - 0x08007fffffff Node[0] Region[2]: 0x080100000000 - 0x0807ffffffffThe UEFI loads Xen hypervisor and DTB into the high memory, the kernel and ramdisk images are loaded into the low memory space:
(XEN) MODULE[0]:
00000807f6df0000-00000807f6f3e000Xen (XEN) MODULE[1]:00000807f8054000-00000807f8056000Device Tree (XEN) MODULE[2]:00000000fa834000-00000000fc5de1d5Ramdisk (XEN) MODULE[3]:00000000fc5df000-00000000ffb3f810KernelIn this case, the Xen binary is loaded above 8TB, which exceeds the maximum supported identity map space of 2TB in Xen. Consequently, the system fails to boot.
This patch enlarges identity map space to 10TB, allowing module loading within the range of [
0x0.. 0x000009ff_ffff_ffff].Quoted 8 lines
Quoted 4 lines
Quoted 1 line
Fixes 1c78d76b67 ("xen/arm64: mm: Introduce helpers to prepare/enable/disable")I don't think a fixes tag applies here given that 2TB was just a number we believed is enough and all of this is platform dependent.
This can be dropped on commit if committer agreesXen may have booted on that platform before hand. So this would be considered a regression and therefore a tag would be warrant.
AFAICT, the commit is only present on the upcoming 4.18. So the question is whether Xen 4.17 booted out-of-the-box on ADLink? If the answer is yes, then we need to add a Fixes tag. But the correct one would be
@Rahul or Luca: could you give an answer here ?
I know you used Xen on an AVA platform but was it booting out of the box ?Quoted 7 lines
Quoted 4 lines
I can’t say for Xen 4.17, but our nightly job has run successfully on AVA for the commit
730406ab81094115d9fb5ca00ba8d53cec1279b3(docs/misra: adddeviations.rstto document additional deviations.)We are not applying any patch for it to run on AVA.
Most likely it is because your UEFI/BIOS firmware is 2.x, for instance 2.04.100.07.
This fix if for AVA machine with older UEFI firmware 1.07.300.03.
Quoted 5 lines
OOI, why not updating your firmware? I was expecting that it would also contain other critical fixes.
With this in mind, I am now more in two mind to ask to merge this patch in Xen 4.18. On one hand, I understand it will help to boot on AVA machine with an older firmware. But on the other hand this is changing the memory layout quite late in the release. The risk seems limited because Xen is not loaded at the top of the virtual address space (there is the directmap afterwards).
Henry (as the release manager) and others, any opinions?
With the new information, I think it should be stated that it is fixing an issue on AVA platforms using an old firmware and platforms with and up-to-date firmware are not impacted. It is an important information to keep in mind that this is not a fix to be backported for example (and for me the fixes tag should not be kept).
On whether or not it should go in the release, I am not quite sure that making a change in the layout at that stage is a good idea unless it is fixing a critical issue (which is not the case here). So i would vote no but not go against if someone argue to have it in.
Cheers
Bertrand
Quoted 5 lines
Cheers,
Signature · 1 line
Julien Grall
Re: [PATCH v4 2/2] xen/arm: Enlarge identity map space to 10TB
Quoted 74 lines · Bertrand Marquis
Hi,
Quoted 72 lines · Julien Grall
CC Henry
Hi Alexey,
Quoted 64 lines · Alexey Klimov
Quoted 53 lines · Luca Fancellu
Quoted 53 lines · Bertrand Marquis
Hi
+Luca and Rahul
Quoted 43 lines · Julien Grall
Quoted 1 line · Michal Orzel
Hi,
Hi,
Quoted 23 lines · Leo Yan
Quoted 22 lines
On ADLink AVA platform (Ampere Altra SoC with 32 Arm Neoverse N1 cores), the physical memory regions are:
DRAM memory regions:
Node[0] Region[0]: 0x000080000000 - 0x0000ffffffff Node[0] Region[1]: 0x080000000000 - 0x08007fffffff Node[0] Region[2]: 0x080100000000 - 0x0807ffffffffThe UEFI loads Xen hypervisor and DTB into the high memory, the kernel and ramdisk images are loaded into the low memory space:
(XEN) MODULE[0]:
00000807f6df0000-00000807f6f3e000Xen (XEN) MODULE[1]:00000807f8054000-00000807f8056000Device Tree (XEN) MODULE[2]:00000000fa834000-00000000fc5de1d5Ramdisk (XEN) MODULE[3]:00000000fc5df000-00000000ffb3f810KernelIn this case, the Xen binary is loaded above 8TB, which exceeds the maximum supported identity map space of 2TB in Xen. Consequently, the system fails to boot.
Quoted 7 lines
Quoted 4 lines
This patch enlarges identity map space to 10TB, allowing module loading within the range of [
0x0.. 0x000009ff_ffff_ffff].Fixes 1c78d76b67 ("xen/arm64: mm: Introduce helpers to prepare/enable/disable")I don't think a fixes tag applies here given that 2TB was just a number we believed is enough and all of this is platform dependent.
This can be dropped on commit if committer agreesXen may have booted on that platform before hand. So this would be considered a regression and therefore a tag would be warrant.
AFAICT, the commit is only present on the upcoming 4.18. So the question is whether Xen 4.17 booted out-of-the-box on ADLink? If the answer is yes, then we need to add a Fixes tag. But the correct one would be
Quoted 7 lines
Quoted 2 lines
@Rahul or Luca: could you give an answer here ?
I know you used Xen on an AVA platform but was it booting out of the box ?I can’t say for Xen 4.17, but our nightly job has run successfully on AVA for the commit
730406ab81094115d9fb5ca00ba8d53cec1279b3(docs/misra: adddeviations.rstto document additional deviations.)We are not applying any patch for it to run on AVA.
Most likely it is because your UEFI/BIOS firmware is 2.x, for instance 2.04.100.07.
This fix if for AVA machine with older UEFI firmware 1.07.300.03.
Quoted 8 lines
Quoted 5 lines
OOI, why not updating your firmware? I was expecting that it would also contain other critical fixes.
With this in mind, I am now more in two mind to ask to merge this patch in Xen 4.18. On one hand, I understand it will help to boot on AVA machine with an older firmware. But on the other hand this is changing the memory layout quite late in the release. The risk seems limited because Xen is not loaded at the top of the virtual address space (there is the directmap afterwards).
Henry (as the release manager) and others, any opinions?
With the new information, I think it should be stated that it is fixing an issue on AVA platforms using an old firmware and platforms with and up-to-date firmware are not impacted. It is an important information to keep in mind that this is not a fix to be backported for example (and for me the fixes tag should not be kept).
IMHO, the fixes tag should not be based solely on the AVA platform. It should be based on whether this could sensibly affect others. Right now, there is nothing that would indicate either way.
And therefore a Fixes tag is sensible. This doesn't mean I would want to backport it right now (note that only 4.18 is affected). But this could change in the future if we get another report (post-4.18) on a platform where there are no other workaround.
Stefano any opinions?
Quoted 3 lines
On whether or not it should go in the release, I am not quite sure that making a change in the layout at that stage is a good idea unless it is fixing a critical issue (which is not the case here). So i would vote no but not go against if someone argue to have it in.
I agree with your statement with the information we have today. But it could become a critical issue if another platform is hit by the same issue and have no other workaround.
Cheers,
Signature · 1 line
Julien Grall
Re: [PATCH v4 2/2] xen/arm: Enlarge identity map space to 10TB
Quoted 90 lines · Julien Grall
Quoted 73 lines · Bertrand Marquis
Hi,
Quoted 72 lines · Julien Grall
CC Henry
Hi Alexey,
Quoted 64 lines · Alexey Klimov
Quoted 53 lines · Luca Fancellu
Quoted 53 lines · Bertrand Marquis
Hi
+Luca and Rahul
Quoted 43 lines · Julien Grall
Quoted 1 line · Michal Orzel
Hi,
Hi,
Quoted 23 lines · Leo Yan
Quoted 22 lines
On ADLink AVA platform (Ampere Altra SoC with 32 Arm Neoverse N1 cores), the physical memory regions are:
DRAM memory regions:
Node[0] Region[0]: 0x000080000000 - 0x0000ffffffff Node[0] Region[1]: 0x080000000000 - 0x08007fffffff Node[0] Region[2]: 0x080100000000 - 0x0807ffffffffThe UEFI loads Xen hypervisor and DTB into the high memory, the kernel and ramdisk images are loaded into the low memory space:
(XEN) MODULE[0]:
00000807f6df0000-00000807f6f3e000Xen (XEN) MODULE[1]:00000807f8054000-00000807f8056000Device Tree (XEN) MODULE[2]:00000000fa834000-00000000fc5de1d5Ramdisk (XEN) MODULE[3]:00000000fc5df000-00000000ffb3f810KernelIn this case, the Xen binary is loaded above 8TB, which exceeds the maximum supported identity map space of 2TB in Xen. Consequently, the system fails to boot.
Quoted 7 lines
Quoted 4 lines
This patch enlarges identity map space to 10TB, allowing module loading within the range of [
0x0.. 0x000009ff_ffff_ffff].Fixes 1c78d76b67 ("xen/arm64: mm: Introduce helpers to prepare/enable/disable")I don't think a fixes tag applies here given that 2TB was just a number we believed is enough and all of this is platform dependent.
This can be dropped on commit if committer agreesXen may have booted on that platform before hand. So this would be considered a regression and therefore a tag would be warrant.
AFAICT, the commit is only present on the upcoming 4.18. So the question is whether Xen 4.17 booted out-of-the-box on ADLink? If the answer is yes, then we need to add a Fixes tag. But the correct one would be
Quoted 7 lines
Quoted 2 lines
@Rahul or Luca: could you give an answer here ?
I know you used Xen on an AVA platform but was it booting out of the box ?I can’t say for Xen 4.17, but our nightly job has run successfully on AVA for the commit
730406ab81094115d9fb5ca00ba8d53cec1279b3(docs/misra: adddeviations.rstto document additional deviations.)We are not applying any patch for it to run on AVA.
Most likely it is because your UEFI/BIOS firmware is 2.x, for instance 2.04.100.07.
This fix if for AVA machine with older UEFI firmware 1.07.300.03.Quoted 7 lines
Quoted 5 lines
OOI, why not updating your firmware? I was expecting that it would also contain other critical fixes.
With this in mind, I am now more in two mind to ask to merge this patch in Xen 4.18. On one hand, I understand it will help to boot on AVA machine with an older firmware. But on the other hand this is changing the memory layout quite late in the release. The risk seems limited because Xen is not loaded at the top of the virtual address space (there is the directmap afterwards).
Henry (as the release manager) and others, any opinions?
With the new information, I think it should be stated that it is fixing an issue on AVA platforms using an old firmware and platforms with and up-to-date firmware are not impacted. It is an important information to keep in mind that this is not a fix to be backported for example (and for me the fixes tag should not be kept).
IMHO, the fixes tag should not be based solely on the AVA platform. It should be based on whether this could sensibly affect others. Right now, there is nothing that would indicate either way.
Quoted 8 lines
And therefore a Fixes tag is sensible. This doesn't mean I would want to backport it right now (note that only 4.18 is affected). But this could change in the future if we get another report (post-4.18) on a platform where there are no other workaround.
Stefano any opinions?
Quoted 2 lines
On whether or not it should go in the release, I am not quite sure that making a change in the layout at that stage is a good idea unless it is fixing a critical issue (which is not the case here). So i would vote no but not go against if someone argue to have it in.
I agree with your statement with the information we have today. But it could become a critical issue if another platform is hit by the same issue and have no other workaround.
I am more seeing this as adding support for platforms with a topology that was not supported until now (because it was not encountered) rather than fixing a bug which is why i find it a bit odd to say that it is fixing some issue. But definitely this is an opinion and nothing that i could argue on :-)
Cheers
Bertrand
Quoted 5 lines
Cheers,
Signature · 1 line
Julien Grall
Re: [PATCH v4 2/2] xen/arm: Enlarge identity map space to 10TB
Quoted 92 lines · Bertrand Marquis
Quoted 92 lines · Julien Grall
Quoted 73 lines · Bertrand Marquis
Hi,
Quoted 72 lines · Julien Grall
CC Henry
Hi Alexey,
Quoted 64 lines · Alexey Klimov
Quoted 53 lines · Luca Fancellu
Quoted 53 lines · Bertrand Marquis
Hi
+Luca and Rahul
Quoted 43 lines · Julien Grall
Quoted 1 line · Michal Orzel
Hi,
Hi,
Quoted 23 lines · Leo Yan
Quoted 22 lines
On ADLink AVA platform (Ampere Altra SoC with 32 Arm Neoverse N1 cores), the physical memory regions are:
DRAM memory regions:
Node[0] Region[0]: 0x000080000000 - 0x0000ffffffff Node[0] Region[1]: 0x080000000000 - 0x08007fffffff Node[0] Region[2]: 0x080100000000 - 0x0807ffffffffThe UEFI loads Xen hypervisor and DTB into the high memory, the kernel and ramdisk images are loaded into the low memory space:
(XEN) MODULE[0]:
00000807f6df0000-00000807f6f3e000Xen (XEN) MODULE[1]:00000807f8054000-00000807f8056000Device Tree (XEN) MODULE[2]:00000000fa834000-00000000fc5de1d5Ramdisk (XEN) MODULE[3]:00000000fc5df000-00000000ffb3f810KernelIn this case, the Xen binary is loaded above 8TB, which exceeds the maximum supported identity map space of 2TB in Xen. Consequently, the system fails to boot.
Quoted 7 lines
Quoted 4 lines
This patch enlarges identity map space to 10TB, allowing module loading within the range of [
0x0.. 0x000009ff_ffff_ffff].Fixes 1c78d76b67 ("xen/arm64: mm: Introduce helpers to prepare/enable/disable")I don't think a fixes tag applies here given that 2TB was just a number we believed is enough and all of this is platform dependent.
This can be dropped on commit if committer agreesXen may have booted on that platform before hand. So this would be considered a regression and therefore a tag would be warrant.
AFAICT, the commit is only present on the upcoming 4.18. So the question is whether Xen 4.17 booted out-of-the-box on ADLink? If the answer is yes, then we need to add a Fixes tag. But the correct one would be
Quoted 7 lines
Quoted 2 lines
@Rahul or Luca: could you give an answer here ?
I know you used Xen on an AVA platform but was it booting out of the box ?I can’t say for Xen 4.17, but our nightly job has run successfully on AVA for the commit
730406ab81094115d9fb5ca00ba8d53cec1279b3(docs/misra: adddeviations.rstto document additional deviations.)We are not applying any patch for it to run on AVA.
Most likely it is because your UEFI/BIOS firmware is 2.x, for instance 2.04.100.07.
This fix if for AVA machine with older UEFI firmware 1.07.300.03.Quoted 7 lines
Quoted 5 lines
OOI, why not updating your firmware? I was expecting that it would also contain other critical fixes.
With this in mind, I am now more in two mind to ask to merge this patch in Xen 4.18. On one hand, I understand it will help to boot on AVA machine with an older firmware. But on the other hand this is changing the memory layout quite late in the release. The risk seems limited because Xen is not loaded at the top of the virtual address space (there is the directmap afterwards).
Henry (as the release manager) and others, any opinions?
With the new information, I think it should be stated that it is fixing an issue on AVA platforms using an old firmware and platforms with and up-to-date firmware are not impacted. It is an important information to keep in mind that this is not a fix to be backported for example (and for me the fixes tag should not be kept).
IMHO, the fixes tag should not be based solely on the AVA platform. It should be based on whether this could sensibly affect others. Right now, there is nothing that would indicate either way.
And therefore a Fixes tag is sensible. This doesn't mean I would want to backport it right now (note that only 4.18 is affected). But this could change in the future if we get another report (post-4.18) on a platform where there are no other workaround.
Quoted 8 lines
Quoted 6 lines
Stefano any opinions?
Quoted 2 lines
On whether or not it should go in the release, I am not quite sure that making a change in the layout at that stage is a good idea unless it is fixing a critical issue (which is not the case here). So i would vote no but not go against if someone argue to have it in.
I agree with your statement with the information we have today. But it could become a critical issue if another platform is hit by the same issue and have no other workaround.
I am more seeing this as adding support for platforms with a topology that was not supported until now (because it was not encountered) rather than fixing a bug which is why i find it a bit odd to say that it is fixing some issue. But definitely this is an opinion and nothing that i could argue on :-)
This is a valid point. The problem is SUPPORT.md doesn't say anything about new HW. So in theory, if it works out-of-the-box on Xen 4.17, then one could expect that it should work on 4.18.
I can see why the owner of the platform may consider it critical. But I can see why the community may say it is not important.
This is not an easy one to solve because we don't exactly know all the use-cases where Xen is used. We only know the public ones.
Cheers,
Signature · 1 line
Julien Grall
Re: [PATCH v4 2/2] xen/arm: Enlarge identity map space to 10TB
In reply to Julien GrallQuoted 110 lines · Julien Grall
Quoted 97 lines · Bertrand Marquis
Quoted 97 lines · Julien Grall
CC Henry
Hi Alexey,
Quoted 72 lines · Alexey Klimov
Quoted 70 lines · Luca Fancellu
Quoted 69 lines
On 16 Oct 2023, at 15:00, Bertrand Marquis
<[email protected]> wrote:Hi
+Luca and Rahul
Quoted 47 lines · Julien Grall
Quoted 1 line · Michal Orzel
Hi,
Hi,
Quoted 32 lines · Leo Yan
Quoted 31 lines
On ADLink AVA platform (Ampere Altra SoC with 32 Arm Neoverse N1 cores),
the physical memory regions are:DRAM memory regions:
Node[0] Region[0]: 0x000080000000 - 0x0000ffffffff Node[0] Region[1]: 0x080000000000 - 0x08007fffffff Node[0] Region[2]: 0x080100000000 - 0x0807ffffffffThe UEFI loads Xen hypervisor and DTB into the high memory, the kernel
and ramdisk images are loaded into the low memory space:(XEN) MODULE[0]:
00000807f6df0000-00000807f6f3e000Xen (XEN) MODULE[1]:00000807f8054000-00000807f8056000Device
Tree
(XEN) MODULE[2]:00000000fa834000-00000000fc5de1d5Ramdisk (XEN) MODULE[3]:00000000fc5df000-00000000ffb3f810KernelIn this case, the Xen binary is loaded above 8TB, which exceeds the
maximum supported identity map space of 2TB in Xen. Consequently, the
system fails to boot.This patch enlarges identity map space to 10TB, allowing module loading
within the range of [0x0.. 0x000009ff_ffff_ffff].Quoted 6 lines
Quoted 2 lines
Fixes 1c78d76b67 ("xen/arm64: mm: Introduce helpers toprepare/enable/disable")
I don't think a fixes tag applies here given that 2TB was just a number we believed is enough
and all of this is platform dependent.
This can be dropped on commit if committer agreesQuoted 8 lines
Xen may have booted on that platform before hand. So this would be considered a regression and therefore a tag would be warrant.
AFAICT, the commit is only present on the upcoming 4.18. So the question is whether Xen 4.17 booted out-of-the-box on ADLink? If the answer is yes, then we need to add a Fixes tag. But the correct one would be
@Rahul or Luca: could you give an answer here ?
I know you used Xen on an AVA platform but was it booting out of the box ?Quoted 8 lines
Quoted 5 lines
I can’t say for Xen 4.17, but our nightly job has run successfully on AVA for the commit
730406ab81094115d9fb5ca00ba8d53cec1279b3(docs/misra: adddeviations.rstto document additional deviations.)We are not applying any patch for it to run on AVA.
Most likely it is because your UEFI/BIOS firmware is 2.x, for instance 2.04.100.07.
This fix if for AVA machine with older UEFI firmware 1.07.300.03.OOI, why not updating your firmware? I was expecting that it would also contain other critical fixes.
With this in mind, I am now more in two mind to ask to merge this patch in Xen 4.18. On one hand, I understand it will help to boot on AVA machine with an older firmware. But on the other hand this is changing the memory layout quite late in the release. The risk seems limited because Xen is not loaded at the top of the virtual address space (there is the directmap afterwards).
Quoted 7 lines
Quoted 1 line
Henry (as the release manager) and others, any opinions?
With the new information, I think it should be stated that it is fixing an issue on AVA platforms using an old firmware and platforms with and up-to-date firmware are not impacted.
It is an important information to keep in mind that this is not a fix to be backported for example (and for me the fixes tag should not be kept).IMHO, the fixes tag should not be based solely on the AVA platform. It should be based on whether this could sensibly affect others. Right now, there is nothing that would indicate either way.
Quoted 6 lines
And therefore a Fixes tag is sensible. This doesn't mean I would want to backport it right now (note that only 4.18 is affected). But this could change in the future if we get another report (post-4.18) on a platform where there are no other workaround.
Stefano any opinions?
The Fixes tag carries useful information but the problem is that it is typically used for identifying backports and this is not a backport (at least today we would not consider it a backport).
So I would provide the same information but without using the Fixes tag. For instance: "This commit fixes an issue that was introduced by XXX because of YYY and only affects the AVA platform with not up-to-date firmware".
That way, we avoid the risk of someone taking all the applicable commits with a Fixes tag and backporting them without thinking twice about it. But we still have the information in the git log.
Re: [PATCH v4 2/2] xen/arm: Enlarge identity map space to 10TB
Hi Stefano,
Quoted 10 lines · Stefano Stabellini
Quoted 6 lines
And therefore a Fixes tag is sensible. This doesn't mean I would want to backport it right now (note that only 4.18 is affected). But this could change in the future if we get another report (post-4.18) on a platform where there are no other workaround.
Stefano any opinions?
The Fixes tag carries useful information but the problem is that it is typically used for identifying backports and this is not a backport (at least today we would not consider it a backport).
Below the definition of Fixes tag (from process/sending-patches.pandoc):
If your patch fixes a bug in a specific commit, e.g. you found an issue using ``git bisect``, please use the Fixes: tag with the first 12 characters of the commit id, and the one line summary.
This doesn't say anything about backport. In fact, we introduced a separate tag for that (see Backport).
Quoted 5 lines
So I would provide the same information but without using the Fixes tag. For instance: "This commit fixes an issue that was introduced by XXX because of YYY and only affects the AVA platform with not up-to-date firmware".
The part after 'and' is misleading. So far we had a report only on AVA platform but this doesn't mean it couldn't happen on other HW. The same is true with the new limit.
So this wants to be:
"and so far we only had a report for the AVA platform when using UEFI older than vX."
Quoted 4 lines
That way, we avoid the risk of someone taking all the applicable commits with a Fixes tag and backporting them without thinking twice about it. But we still have the information in the git log.
I don't really see the problem for someone to mistakenly backport this patch. In fact, this could potentially save them a lot of debugging if it happens that Xen is loaded above 2TB.
Anyway, both Bertrand and you seems to be against the Fixes tag here. So I can compromise with the "This commit fixes...". However, can Bertrand or you update process/send-patches.pandoc so it is clear for a contributor when they should add Fixes tag (which BTW I still disagree with but if the majority agrees, then I will not nack)?
Regarding this patch itself, Stefano can you queue to your branch for-4.19?
Cheers,
Signature · 1 line
Julien Grall
Re: [PATCH v4 2/2] xen/arm: Enlarge identity map space to 10TB
Hi,
Quoted 31 lines · Julien Grall
Quoted 10 lines · Stefano Stabellini
Quoted 6 lines
And therefore a Fixes tag is sensible. This doesn't mean I would want to backport it right now (note that only 4.18 is affected). But this could change in the future if we get another report (post-4.18) on a platform where there are no other workaround.
Stefano any opinions?
The Fixes tag carries useful information but the problem is that it is typically used for identifying backports and this is not a backport (at least today we would not consider it a backport).
Below the definition of Fixes tag (from process/sending-patches.pandoc):
If your patch fixes a bug in a specific commit, e.g. you found an issue using ``git bisect``, please use the
Fixes:tag with the first 12 characters of the commit id, and the one line summary.This doesn't say anything about backport. In fact, we introduced a separate tag for that (see Backport).
Quoted 5 lines
So I would provide the same information but without using the Fixes tag. For instance: "This commit fixes an issue that was introduced by XXX because of YYY and only affects the AVA platform with not up-to-date firmware".
The part after 'and' is misleading. So far we had a report only on AVA platform but this doesn't mean it couldn't happen on other HW. The same is true with the new limit.
So this wants to be:
"and so far we only had a report for the AVA platform when using UEFI older than vX."
Quoted 1 line
Quoted 7 lines
Quoted 3 lines
That way, we avoid the risk of someone taking all the applicable commits with a Fixes tag and backporting them without thinking twice about it. But we still have the information in the git log.
I don't really see the problem for someone to mistakenly backport this patch. In fact, this could potentially save them a lot of debugging if it happens that Xen is loaded above 2TB.
Anyway, both Bertrand and you seems to be against the Fixes tag here. So I can compromise with the "This commit fixes...". However, can Bertrand or you update process/send-patches.pandoc so it is clear for a contributor when they should add Fixes tag (which BTW I still disagree with but if the majority agrees, then I will not nack)?
We had a chat about this during the Arm maintainer calls. The disagreement boiled down to the fact that SUPPORT.md (or the documentation) doesn't say anything about whether loading Xen above 2TB was supported or not. Depending on the view, one could consider a bug or not.
Looking through the documentation, the best place to document might actually be misc/arm/booting.txt where we already have some requirements to boot Xen (such the binary must be entered in NS EL2 mode).
I will prepare a patch and send one.
Cheers,
Signature · 1 line
Julien Grall
Re: [PATCH v4 2/2] xen/arm: Enlarge identity map space to 10TB
Hi Julien,
Quoted 2 lines · Julien Grall
Quoted 1 line · Julien Grall
On 17/10/2023 20:58, Stefano Stabellini wrote:
[...]
Quoted 15 lines
Quoted 9 lines
I don't really see the problem for someone to mistakenly backport this patch. In fact, this could potentially save them a lot of debugging if it happens that Xen is loaded above 2TB.
Anyway, both Bertrand and you seems to be against the Fixes tag here. So I can compromise with the "This commit fixes...". However, can Bertrand or you update process/send-patches.pandoc so it is clear for a contributor when they should add Fixes tag (which BTW I still disagree with but if the majority agrees, then I will not nack)?
We had a chat about this during the Arm maintainer calls. The disagreement boiled down to the fact that SUPPORT.md (or the documentation) doesn't say anything about whether loading Xen above 2TB was supported or not. Depending on the view, one could consider a bug or not.
Quoted 5 lines
Looking through the documentation, the best place to document might actually be
misc/arm/booting.txtwhere we already have some requirements to boot Xen (such the binary must be entered in NS EL2 mode).I will prepare a patch and send one.
I would like to check if here is anything specific I should follow up on. Based on the discussion in this thread, I've come to the following conclusions:
- Remove the fixes tags;
- Add a description in commit log, something like:
"Since commit 1c78d76b67e1 ('xen/arm64: mm: Introduce helpers to
prepare/enable/disable the identity mapping'), Xen will fail to boot up if it's loaded in memory above 2TB. This commit fixes the regression introduced by that commit."
- Add tages:
A review tag from Michal Orzel
A review tag from Bertrand Marquis
A test tag from Henry Wang
Should I repin a new patch set to address the items mentioned above?
Another question is for the 'Release-acked-by' tag. Henry gave this tag, but I don't know how to handle it if I need to respin this patch. Seems to me this is a special tag only for release process, so I don't need to include it in the new patch, right?
Thanks all of you for the efforts on this patch set!
Leo
Re: [PATCH v4 2/2] xen/arm: Enlarge identity map space to 10TB
Quoted 1 line · Leo Yan
Hi Julien,
Hi Leo,
Quoted 43 lines · Julien Grall
Quoted 2 lines · Julien Grall
Quoted 1 line · Stefano Stabellini
[...]
Quoted 15 lines
Quoted 9 lines
I don't really see the problem for someone to mistakenly backport this patch. In fact, this could potentially save them a lot of debugging if it happens that Xen is loaded above 2TB.
Anyway, both Bertrand and you seems to be against the Fixes tag here. So I can compromise with the "This commit fixes...". However, can Bertrand or you update process/send-patches.pandoc so it is clear for a contributor when they should add Fixes tag (which BTW I still disagree with but if the majority agrees, then I will not nack)?
We had a chat about this during the Arm maintainer calls. The disagreement boiled down to the fact that SUPPORT.md (or the documentation) doesn't say anything about whether loading Xen above 2TB was supported or not. Depending on the view, one could consider a bug or not.
Quoted 5 lines
Looking through the documentation, the best place to document might actually be
misc/arm/booting.txtwhere we already have some requirements to boot Xen (such the binary must be entered in NS EL2 mode).I will prepare a patch and send one.
I would like to check if here is anything specific I should follow up on. Based on the discussion in this thread, I've come to the following conclusions:
- Remove the fixes tags;
- Add a description in commit log, something like:
"Since commit1c78d76b67e1('xen/arm64: mm: Introduce helpers to
prepare/enable/disable the identity mapping'), Xen will fail to boot up if it's loaded in memory above 2TB. This commit fixes the regression introduced by that commit."
- Add tages:
A review tag from Michal Orzel
A review tag from Bertrand Marquis
A test tag from Henry Wang
Quoted 1 line
Should I repin a new patch set to address the items mentioned above?
You will also want to update the documentation after "docs/arm: Document where Xen should be loaded in memory"
Quoted 5 lines
Another question is for the 'Release-acked-by' tag. Henry gave this tag, but I don't know how to handle it if I need to respin this patch. Seems to me this is a special tag only for release process, so I don't need to include it in the new patch, right?
The release-acked-by tag is only necessary during freeze period if the patch will land in the next release (i.e. 4.18). In this case, your patch will be part of the 4.19, so you can remove the release-acked-by.
If your patch was targeting 4.19, then it is usually fine to keep the release-acked-by even for the respin. It means that the release manager is happy for the patch to go assuming the patch has all the necessary reviews.
Cheers,
Signature · 1 line
Julien Grall
Re: [PATCH v4 2/2] xen/arm: Enlarge identity map space to 10TB
Hi Julien,
On Mon, Nov 06, 2023 at 09:39:24AM +0000, Julien Grall wrote:
[...]
Quoted 15 lines
Quoted 15 lines
I would like to check if here is anything specific I should follow up on. Based on the discussion in this thread, I've come to the following conclusions:
- Remove the fixes tags;
- Add a description in commit log, something like:
"Since commit1c78d76b67e1('xen/arm64: mm: Introduce helpers to
prepare/enable/disable the identity mapping'), Xen will fail to boot up if it's loaded in memory above 2TB. This commit fixes the regression introduced by that commit."
- Add tages:
A review tag from Michal Orzel
A review tag from Bertrand Marquis
A test tag from Henry Wang
Quoted 5 lines
Quoted 1 line
Should I repin a new patch set to address the items mentioned above?
You will also want to update the documentation after "docs/arm: Document where Xen should be loaded in memory"
Will do.
Quoted 8 lines
Quoted 4 lines
Another question is for the 'Release-acked-by' tag. Henry gave this tag, but I don't know how to handle it if I need to respin this patch. Seems to me this is a special tag only for release process, so I don't need to include it in the new patch, right?
The release-acked-by tag is only necessary during freeze period if the patch will land in the next release (i.e. 4.18). In this case, your patch will be part of the 4.19, so you can remove the release-acked-by.
Okay, I will _not_ include release-acked-by tag in the respin.
Quoted 3 lines
If your patch was targeting 4.19, then it is usually fine to keep the release-acked-by even for the respin. It means that the release manager is happy for the patch to go assuming the patch has all the necessary reviews.
Thanks for explaination.
Leo
Re: [PATCH v4 2/2] xen/arm: Enlarge identity map space to 10TB
Hi Leo,
Quoted 34 lines · Leo Yan
Hi Julien,
On Mon, Nov 06, 2023 at 09:39:24AM +0000, Julien Grall wrote:
[...]
Quoted 15 lines
Quoted 15 lines
I would like to check if here is anything specific I should follow up on. Based on the discussion in this thread, I've come to the following conclusions:
- Remove the fixes tags;
- Add a description in commit log, something like:
"Since commit1c78d76b67e1('xen/arm64: mm: Introduce helpers to
prepare/enable/disable the identity mapping'), Xen will fail to boot up if it's loaded in memory above 2TB. This commit fixes the regression introduced by that commit."
- Add tages:
A review tag from Michal Orzel
A review tag from Bertrand Marquis
A test tag from Henry WangQuoted 5 lines
Quoted 1 line
Should I repin a new patch set to address the items mentioned above?
You will also want to update the documentation after "docs/arm: Document where Xen should be loaded in memory"
Will do.
Quoted 5 lines
Quoted 4 lines
Another question is for the 'Release-acked-by' tag. Henry gave this tag, but I don't know how to handle it if I need to respin this patch. Seems to me this is a special tag only for release process, so I don't need to include it in the new patch, right?
Quoted 5 lines
Quoted 3 lines
The release-acked-by tag is only necessary during freeze period if the patch will land in the next release (i.e. 4.18). In this case, your patch will be part of the 4.19, so you can remove the release-acked-by.
Okay, I will _not_ include release-acked-by tag in the respin.
I have done the changes and directly committed the series. So no need to respin.
Cheers,
Signature · 1 line
Julien Grall
Re: [PATCH v4 2/2] xen/arm: Enlarge identity map space to 10TB
On Thu, Nov 16, 2023 at 02:21:18PM +0000, Julien Grall wrote:
[...]
Quoted 2 lines
I have done the changes and directly committed the series. So no need to respin.
Thanks a lot, Julien!
Leo
Re: [PATCH v4 2/2] xen/arm: Enlarge identity map space to 10TB
In reply to Julien GrallHi all,
On Wed, Oct 18, 2023 at 07:11:11PM +0100, Julien Grall wrote:
[...]
Quoted 11 lines
Quoted 5 lines
Anyway, both Bertrand and you seems to be against the Fixes tag here. So I can compromise with the "This commit fixes...". However, can Bertrand or you update process/send-patches.pandoc so it is clear for a contributor when they should add Fixes tag (which BTW I still disagree with but if the majority agrees, then I will not nack)?
We had a chat about this during the Arm maintainer calls. The disagreement boiled down to the fact that SUPPORT.md (or the documentation) doesn't say anything about whether loading Xen above 2TB was supported or not. Depending on the view, one could consider a bug or not.
Quoted 5 lines
Looking through the documentation, the best place to document might actually be
misc/arm/booting.txtwhere we already have some requirements to boot Xen (such the binary must be entered in NS EL2 mode).I will prepare a patch and send one.
I saw Julien's patch "docs/arm: Document where Xen should be loaded in memory" has landed on the staging branch [1].
Should I respin this patch set and update the document to 10TB limitation? I need maintainer's sugguestion, otherwise I don't know how to proceed for this patch set.
Thanks,
Leo
[1] https://xenbits.xen.org/gitweb/?p=xen.git;a=commitdiff;h=5415b2b2118bd78d8a04f276a8312f7f0cb1a466
Henry Wang
Tested-byRe: [PATCH v4 2/2] xen/arm: Enlarge identity map space to 10TB
In reply to Julien GrallHi Julien,
Quoted 3 lines · Julien Grall
CC Henry
Thanks.
Quoted 47 lines
Hi Alexey,
Quoted 44 lines · Alexey Klimov
On Mon, 16 Oct 2023 at 15:13, Luca Fancellu <[email protected]> wrote
Quoted 43 lines
Quoted 32 lines
Quoted 32 lines · Michal Orzel
Quoted 30 lines · Leo Yan
Quoted 18 lines
On ADLink AVA platform (Ampere Altra SoC with 32 Arm Neoverse N1 cores), the physical memory regions are:
DRAM memory regions:
Node[0] Region[0]: 0x000080000000 - 0x0000ffffffff Node[0] Region[1]: 0x080000000000 - 0x08007fffffff Node[0] Region[2]: 0x080100000000 - 0x0807ffffffffThe UEFI loads Xen hypervisor and DTB into the high memory, the kernel and ramdisk images are loaded into the low memory space:
(XEN) MODULE[0]:
00000807f6df0000-00000807f6f3e000Xen (XEN) MODULE[1]:00000807f8054000-00000807f8056000Device Tree (XEN) MODULE[2]:00000000fa834000-00000000fc5de1d5Ramdisk (XEN) MODULE[3]:00000000fc5df000-00000000ffb3f810KernelQuoted 8 lines
In this case, the Xen binary is loaded above 8TB, which exceeds the maximum supported identity map space of 2TB in Xen. Consequently, the system fails to boot.
This patch enlarges identity map space to 10TB, allowing module loading within the range of [
0x0.. 0x000009ff_ffff_ffff].Fixes 1c78d76b67 ("xen/arm64: mm: Introduce helpers to prepare/enable/disable")I don't think a fixes tag applies here given that 2TB was just a number we believed is enough and all of this is platform dependent.
This can be dropped on commit if committer agreesQuoted 7 lines
Quoted 4 lines
Xen may have booted on that platform before hand. So this would be considered a regression and therefore a tag would be warrant.
AFAICT, the commit is only present on the upcoming 4.18. So the question is whether Xen 4.17 booted out-of-the-box on ADLink? If the answer is yes, then we need to add a Fixes tag. But the correct one would be
@Rahul or Luca: could you give an answer here ?
I know you used Xen on an AVA platform but was it booting out of the box ?I can’t say for Xen 4.17, but our nightly job has run successfully on AVA for the commit
730406ab81094115d9fb5ca00ba8d53cec1279b3(docs/misra: adddeviations.rstto document additional deviations.)
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
We are not applying any patch for it to run on AVA.
Most likely it is because your UEFI/BIOS firmware is 2.x, for instance 2.04.100.07.
This fix if for AVA machine with older UEFI firmware 1.07.300.03.OOI, why not updating your firmware? I was expecting that it would also contain other critical fixes.
Not sure what is the reason from Alexey’s side, but from my experience of updating AVA firmware, it is sometimes tricky as I remember I did 5 boards using the same set of upgrade instructions but one board was bricked magically during this progress (Funny that the reason why we upgrade the firmware was to fix this issue…). Once this happens, the only method to recover is to have a dediprog or something similar to program the flash. If there is no handy tools, then there would be a problem…So I understand people may don’t really want to do the upgrading, but indeed I also recommend to upgrade the firmware.
Quoted 4 lines
With this in mind, I am now more in two mind to ask to merge this patch in Xen 4.18. On one hand, I understand it will help to boot on AVA machine with an older firmware. But on the other hand this is changing the memory layout quite late in the release. The risk seems limited because Xen is not loaded at the top of the virtual address space (there is the directmap afterwards).
Henry (as the release manager) and others, any opinions?
I tested this series on top of today’s staging in our CI and it seems that this series is not breaking any boards/emulators we used for testing, so:
I saw you and Bertrand had a slightly different opinion on this and probably we need Stefano’s input too, Any ideas Stefano?
But I personally won’t block this patch, so if the discussion is settled to merge this to 4.18, feel free:
Kind regards,
Henry
Quoted 5 lines
Cheers,
Signature · 1 line
Julien Grall
Re: [PATCH v4 2/2] xen/arm: Enlarge identity map space to 10TB
In reply to Julien GrallQuoted 38 lines · Julien Grall
Quoted 1 line · Michal Orzel
Hi,
Hi,
Quoted 23 lines · Leo Yan
Quoted 22 lines
On ADLink AVA platform (Ampere Altra SoC with 32 Arm Neoverse N1 cores), the physical memory regions are:
DRAM memory regions: Node[0] Region[0]: 0x000080000000 - 0x0000ffffffff Node[0] Region[1]: 0x080000000000 - 0x08007fffffff Node[0] Region[2]: 0x080100000000 - 0x0807ffffffffThe UEFI loads Xen hypervisor and DTB into the high memory, the kernel and ramdisk images are loaded into the low memory space:
(XEN) MODULE[0]: 00000807f6df0000 - 00000807f6f3e000 Xen (XEN) MODULE[1]: 00000807f8054000 - 00000807f8056000 Device Tree (XEN) MODULE[2]: 00000000fa834000 - 00000000fc5de1d5 Ramdisk (XEN) MODULE[3]: 00000000fc5df000 - 00000000ffb3f810 KernelIn this case, the Xen binary is loaded above 8TB, which exceeds the maximum supported identity map space of 2TB in Xen. Consequently, the system fails to boot.
Quoted 7 lines
Quoted 4 lines
This patch enlarges identity map space to 10TB, allowing module loading within the range of [
0x0.. 0x000009ff_ffff_ffff].Fixes 1c78d76b67 ("xen/arm64: mm: Introduce helpers to prepare/enable/disable")I don't think a fixes tag applies here given that 2TB was just a number we believed is enough and all of this is platform dependent.
This can be dropped on commit if committer agrees
Quoted 6 lines
Xen may have booted on that platform before hand. So this would be considered a regression and therefore a tag would be warrant.
AFAICT, the commit is only present on the upcoming 4.18. So the question is whether Xen 4.17 booted out-of-the-box on ADLink? If the answer is yes, then we need to add a Fixes tag. But the correct one would be
Yes. The upstream xen 4.17 booted fine and the mentioned commit was found during bisect, so it is introduced regression.
I'd personally say that "Fixes" tag is needed here.
Thanks,
Alexey
Re: [PATCH v4 2/2] xen/arm: Enlarge identity map space to 10TB
In reply to Leo YanHi,
Quoted 18 lines · Leo Yan
On ADLink AVA platform (Ampere Altra SoC with 32 Arm Neoverse N1 cores), the physical memory regions are:
DRAM memory regions:
Node[0] Region[0]: 0x000080000000 - 0x0000ffffffff Node[0] Region[1]: 0x080000000000 - 0x08007fffffff Node[0] Region[2]: 0x080100000000 - 0x0807ffffffffThe UEFI loads Xen hypervisor and DTB into the high memory, the kernel and ramdisk images are loaded into the low memory space:
(XEN) MODULE[0]:
00000807f6df0000-00000807f6f3e000Xen (XEN) MODULE[1]:00000807f8054000-00000807f8056000Device Tree (XEN) MODULE[2]:00000000fa834000-00000000fc5de1d5Ramdisk (XEN) MODULE[3]:00000000fc5df000-00000000ffb3f810Kernel
Quoted 8 lines
In this case, the Xen binary is loaded above 8TB, which exceeds the maximum supported identity map space of 2TB in Xen. Consequently, the system fails to boot.
This patch enlarges identity map space to 10TB, allowing module loading within the range of [
0x0.. 0x000009ff_ffff_ffff].Fixes 1c78d76b67 ("xen/arm64: mm: Introduce helpers to prepare/enable/disable")
I agree with Michal here, this is not a fix so this should be removed (can be done on commit).
Quoted 2 lines
Reported-by Alexey Klimov <[email protected]>Signed-off-by Leo Yan <[email protected]>
Cheers
Bertrand
Quoted 68 lines
---
xen/arch/arm/arm64/mm.c| 6 ++++--xen/arch/arm/include/asm/mmu/layout.h| 8 ++++----2 files changed, 8 insertions(+), 6 deletions(-)xen/arch/arm/arm64/mm.c +4
-2@@ -41,7 +41,8 @@ static void __init prepare_boot_identity_mapping(void)clear_page (boot_third_id);if ( id_offsets[0 ] >=IDENTITY_MAPPING_AREA_NR_L0 ) -panic ("Cannot handle ID mapping above 2TB\n" ); +panic ("Cannot handle ID mapping above %uTB\n" , +IDENTITY_MAPPING_AREA_NR_L0 >>1 );/* Link first ID table */ pte =mfn_to_xen_entry (virt_to_mfn (boot_first_id),MT_NORMAL );@@ -74,7 +75,8 @@ static void __init prepare_runtime_identity_mapping(void)DECLARE_OFFSETS (id_offsets, id_addr);if ( id_offsets[0 ] >=IDENTITY_MAPPING_AREA_NR_L0 ) -panic ("Cannot handle ID mapping above 2TB\n" ); +panic ("Cannot handle ID mapping above %uTB\n" , +IDENTITY_MAPPING_AREA_NR_L0 >>1 );/* Link first ID table */ pte =pte_of_xenaddr ((vaddr_t )xen_first_id);xen/arch/arm/include/asm/mmu/layout.h +4
-4@@ -19,11 +19,11 @@* 2G - 4G Domheap: on-demand-mapped * * ARM64 layout: -* 0x0000000000000000 - 0x000001ffffffffff (2TB, L0 slots [0..3]) +* 0x0000000000000000 - 0x000009ffffffffff (10TB, L0 slots [0..19]) * * Reserved to identity map Xen * -* 0x0000020000000000 - 0x0000027fffffffff (512GB, L0 slot [4]) +* 0x00000a0000000000 - 0x00000a7fffffffff (512GB, L0 slot [20]) * (Relative offsets) * 0 - 2M Unmapped * 2M - 10M Xen text, data, bss @@ -35,7 +35,7 @@* * 32G - 64G Frametable: 56 bytes per page for 2TB of RAM * -* 0x0000028000000000 - 0x00007fffffffffff (125TB, L0 slots [5..255]) +* 0x00000a8000000000 - 0x00007fffffffffff (512GB+117TB, L0 slots [21..255]) * Unused * * 0x0000800000000000 - 0x000084ffffffffff (5TB, L0 slots [256..265]) @@ -49,7 +49,7 @@#define XEN_VIRT_START _AT(vaddr_t, MB(2))#else -#define IDENTITY_MAPPING_AREA_NR_L0 4 +#define IDENTITY_MAPPING_AREA_NR_L0 20#define XEN_VM_MAPPING SLOT0(IDENTITY_MAPPING_AREA_NR_L0)#define SLOT0_ENTRY_BITS 39Signature · 1 line
2.39.2
Re: [PATCH v4 2/2] xen/arm: Enlarge identity map space to 10TB
On Mon, Oct 16, 2023 at 01:40:26PM +0000, Bertrand Marquis wrote:
[...]
Quoted 7 lines
Quoted 4 lines
This patch enlarges identity map space to 10TB, allowing module loading within the range of [
0x0.. 0x000009ff_ffff_ffff].Fixes 1c78d76b67 ("xen/arm64: mm: Introduce helpers to prepare/enable/disable")I agree with Michal here, this is not a fix so this should be removed (can be done on commit).
This is fine for me.
I'd like to confirm with maintainers that should I spin a new patch set to remove the fix tag? Or maintainers could help to remove it when pick up this patch set.
And thanks for review, Michal and Bertrand.
Leo
Quoted 7 lines
Quoted 2 lines
Reported-by Alexey Klimov <[email protected]>Signed-off-by Leo Yan <[email protected]>Reviewed-by Bertrand Marquis <[email protected]>Cheers
Bertrand
Re: [PATCH v4 2/2] xen/arm: Enlarge identity map space to 10TB
Hi Leo,
Quoted 9 lines · Leo Yan
On Mon, Oct 16, 2023 at 01:40:26PM +0000, Bertrand Marquis wrote:
[...]
Quoted 5 lines
Quoted 4 lines
This patch enlarges identity map space to 10TB, allowing module loading within the range of [
0x0.. 0x000009ff_ffff_ffff].Fixes 1c78d76b67 ("xen/arm64: mm: Introduce helpers to prepare/enable/disable")
Quoted 8 lines
Quoted 2 lines
I agree with Michal here, this is not a fix so this should be removed (can be done on commit).
This is fine for me.
I'd like to confirm with maintainers that should I spin a new patch set to remove the fix tag? Or maintainers could help to remove it when pick up this patch set.
I can do small changes while committing (updating the fixes tag is one).
That said, we are in the middle of the code freeze for Xen 4.18. Any patch requires a release-ack from the release manager (Henry). I am a bit split at the moment whether we want this patch for Xen 4.18. So I have asked opinions from Henry (others can also provide some).
If it doesn't go for Xen 4.18, then Stefano might be able to queue it in his for-4.19. Otherwise, it will be picked up when the tree re-open hopefully in a couple of weeks time.
Cheers,
Quoted 12 lines
And thanks for review, Michal and Bertrand.
Leo
Quoted 7 lines
Quoted 2 lines
Reported-by Alexey Klimov <[email protected]>Signed-off-by Leo Yan <[email protected]>Reviewed-by Bertrand Marquis <[email protected]>Cheers
Bertrand
Signature · 1 line
Julien Grall