xen/arm: p2m: configure pa_range_info table to support 42 bit PA systems.
PATCH 1/1 xen/arm: p2m: configure pa_range_info table to support 42 bit PA systems.
Current pa_range_info table's configuration prevents 42 bit PA systems from booting DOM0. This patch modifies t0sz=22 and root_order=3 to expose 42-bit IPA (Intermediate Physical Address).
It is required for hardware which is having peripherals above 40 bits.
--- xen/arch/arm/p2m.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
xen/arch/arm/p2m.c +4 -1
@@ -1992,10 +1992,13 @@ void __init setup_virt_paging(void) } pa_range_info[] = {/* T0SZ minimum and SL0 maximum from ARM DDI 0487A.b Table D4-5 */ /* PA size, t0sz(min), root-order, sl0(max) */ +/* TODO: 42 bit PA systems allocate 8 pages by default +* for both DOM0 and guests. +*/ [0] = { 32, 32/*32*/, 0, 1 }, [1] = { 36, 28/*28*/, 0, 1 }, [2] = { 40, 24/*24*/, 1, 1 }, - [3] = { 42, 24/*22*/, 1, 1 }, + [3] = { 42, 22/*22*/, 3, 1 }, [4] = { 44, 20/*20*/, 0, 2 }, [5] = { 48, 16/*16*/, 0, 2 }, [6] = { 0 }, /* Invalid */
--
2.19.1
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Hi,
Thank you for posting the patch.
Title: No need for full stop in the commit title.
Quoted 5 lines · Vishnu Pajjuri OS
Current
pa_range_infotable's configuration prevents 42 bit PA systems from booting DOM0. This patch modifies t0sz=22 and root_order=3 to expose 42-bit IPA (Intermediate Physical Address).It is required for hardware which is having peripherals above 40 bits.
The commit message is a bit confusing, you first say Xen does not boot on 42-bits PA systems but towards the end of the commit you restrict to only platform that have address wired above 40-bits.
The limitation was introduced because existing platform back then had all address wired below 40-bits. So we can limit to 40-bits and allocate 2 pages rather than 8 pages for each page-tables.
While I am perfectly fine to see this for Dom0, I am still unsure this is the right things for guest. Do you currently have any use case for 42-bits (4TB) guest?
I can't remember which other platforms support 42-bits PA. I think at that time it was X-Gene. As long as no current embedded platform we support use 42-bit PA, this change may be ok. Stefano do you recall what was the platform?
In any case, the new behavior (and consequence) needs to be clearly explained in the commit message.
Quoted 12 lines
Signed-off-by Vishnu <[email protected]>Signed-off-by Feng Kan <[email protected]>--- xen/arch/arm/p2m.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)xen/arch/arm/p2m.c +0
-0
xen/arch/arm/p2m.c void __init setup_virt_paging(void) · line 1997
Quoted 6 lines
xen/arch/arm/p2m.c +3
-0@@ -1992,10 +1992,13 @@ void __init setup_virt_paging(void) } pa_range_info[] = {/* T0SZ minimum and SL0 maximum from ARM DDI 0487A.b Table D4-5 */ /* PA size, t0sz(min), root-order, sl0(max) */ +/* TODO: 42 bit PA systems allocate 8 pages by default +* for both DOM0 and guests. +*/
Xen uses soft-tab and not hard-tab. Also, multi-lines comment in Xen looks like:
/*
* Foo
*/
Lastly, what you have after the TODO is more a fact than a TODO. If we decide to keep the TODO, then it should explain what we need to do.
Quoted 11 lines
xen/arch/arm/p2m.c +1
-2[0] = { 32, 32/*32*/, 0, 1 }, [1] = { 36, 28/*28*/, 0, 1 }, [2] = { 40, 24/*24*/, 1, 1 }, - [3] = { 42, 24/*22*/, 1, 1 }, + [3] = { 42, 22/*22*/, 3, 1 }, [4] = { 44, 20/*20*/, 0, 2 }, [5] = { 48, 16/*16*/, 0, 2 }, [6] = { 0 }, /* Invalid */ --2.19.1
Cheers,
Signature · 6 lines
Julien Grall _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Thanks Julien.
Quoted 17 lines · Julien Grall
Hi,
Thank you for posting the patch.
Title: No need for full stop in the commit title.
Quoted 5 lines · Vishnu Pajjuri OS
Current
pa_range_infotable's configuration prevents 42 bit PA systems from booting DOM0. This patch modifies t0sz=22 and root_order=3 to expose 42-bit IPA (Intermediate Physical Address).It is required for hardware which is having peripherals above 40 bits.
The commit message is a bit confusing, you first say Xen does not boot on 42-bits PA systems but towards the end of the commit you restrict to only platform that have address wired above 40-bits.
Quoted 7 lines
The limitation was introduced because existing platform back then had all address wired below 40-bits. So we can limit to 40-bits and allocate 2 pages rather than 8 pages for each page-tables.
While I am perfectly fine to see this for Dom0, I am still unsure this is the right things for guest. Do you currently have any use case for 42-bits (4TB) guest?
I agree there is no use case at the moment for 42 bit guest, it is a fix for DOM0 booting with peripheral and memory above 40 bits of PA. The other option is to keep separate table for the guest?
Quoted 5 lines
I can't remember which other platforms support 42-bits PA. I think at that time it was X-Gene. As long as no current embedded platform we support use 42-bit PA, this change may be ok. Stefano do you recall what was the platform?
Ampere eMAG platform is essentially the continuation of X-Gene. These systems are targeted as servers with upto 1TB of RAM.
Quoted 3 lines
In any case, the new behavior (and consequence) needs to be clearly explained in the commit message.
Got it, we will resubmit if Stefano is okay with the change.
Quoted 43 lines
Quoted 15 lines
Signed-off-by Vishnu <[email protected]>Signed-off-by Feng Kan <[email protected]>---
xen/arch/arm/p2m.c| 5 ++++-1 file changed, 4 insertions(+), 1 deletion(-)xen/arch/arm/p2m.c +0
-0@@ -1992,10 +1992,13 @@ void __init setup_virt_paging(void) } pa_range_info[] = { /* T0SZ minimum and SL0 maximum from ARM DDI 0487A.b TableQuoted 5 lines
D4-5 */
/* PA size, t0sz(min), root-order, sl0(max) */ + /* TODO: 42 bit PA systems allocate 8 pages by default + * for both DOM0 and guests.
+ */Xen uses soft-tab and not hard-tab. Also, multi-lines comment in Xen looks like:
/*
* Foo
*/Lastly, what you have after the TODO is more a fact than a TODO. If we decide to keep the TODO, then it should explain what we need to do.
Quoted 11 lines
[0] = { 32, 32/*32*/, 0, 1 },
[1] = { 36, 28/*28*/, 0, 1 },
[2] = { 40, 24/*24*/, 1, 1 }, - [3] = { 42, 24/*22*/, 1, 1 }, + [3] = { 42, 22/*22*/, 3, 1 },
[4] = { 44, 20/*20*/, 0, 2 },
[5] = { 48, 16/*16*/, 0, 2 },
[6] = { 0 }, /* Invalid */Signature · 1 line
2.19.1
Quoted 2 lines
Cheers,
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Hello,
Quoted 16 lines · Feng Kan OS
Quoted 15 lines · Julien Grall
Quoted 5 lines · Vishnu Pajjuri OS
Current
pa_range_infotable's configuration prevents 42 bit PA systems from booting DOM0. This patch modifies t0sz=22 and root_order=3 to expose 42-bit IPA (Intermediate Physical Address).It is required for hardware which is having peripherals above 40 bits.
The commit message is a bit confusing, you first say Xen does not boot on 42-bits PA systems but towards the end of the commit you restrict to only platform that have address wired above 40-bits.
The limitation was introduced because existing platform back then had all address wired below 40-bits. So we can limit to 40-bits and allocate 2 pages rather than 8 pages for each page-tables.
Quoted 6 lines
Quoted 3 lines
While I am perfectly fine to see this for Dom0, I am still unsure this is the right things for guest. Do you currently have any use case for 42-bits (4TB) guest?
I agree there is no use case at the moment for 42 bit guest, it is a fix for DOM0 booting with peripheral and memory above 40 bits of PA. The other option is to keep separate table for the guest?
Having a separate table is a possibility. Although, it would require a bit more work than that. VCR_EL2, P2M_ROOT_LEVEL, P2M_ROOT_ORDER would now become per-domain.
I am not entirely sure such changes is worth it yet. IIRC, in the previous version of this patch, this would be fine for you to allocate more memory as you have a lot of memory. Am I correct?
Quoted 7 lines
Quoted 5 lines
I can't remember which other platforms support 42-bits PA. I think at that time it was X-Gene. As long as no current embedded platform we support use 42-bit PA, this change may be ok. Stefano do you recall what was the platform?
Ampere eMAG platform is essentially the continuation of X-Gene. These systems are targeted as servers with upto 1TB of RAM.
So my memory hasn't failed yet :).
Signature · 6 lines
Julien Grall _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 26 lines · Julien Grall
Hello,
Quoted 16 lines · Feng Kan OS
Quoted 15 lines · Julien Grall
Quoted 5 lines · Vishnu Pajjuri OS
Current
pa_range_infotable's configuration prevents 42 bit PA systems from booting DOM0. This patch modifies t0sz=22 and root_order=3 to expose 42-bit IPA (Intermediate Physical Address).It is required for hardware which is having peripherals above 40 bits.
The commit message is a bit confusing, you first say Xen does not boot on 42-bits PA systems but towards the end of the commit you restrict to only platform that have address wired above 40-bits.
The limitation was introduced because existing platform back then had all address wired below 40-bits. So we can limit to 40-bits and allocate 2 pages rather than 8 pages for each page-tables.
Quoted 6 lines
Quoted 3 lines
While I am perfectly fine to see this for Dom0, I am still unsure this is the right things for guest. Do you currently have any use case for 42-bits (4TB) guest?
I agree there is no use case at the moment for 42 bit guest, it is a fix for DOM0 booting with peripheral and memory above 40 bits of PA. The other option is to keep separate table for the guest?
Quoted 7 lines
Having a separate table is a possibility. Although, it would require a bit more work than that.
VCR_EL2,P2M_ROOT_LEVEL,P2M_ROOT_ORDERwould now become per-domain.I am not entirely sure such changes is worth it yet. IIRC, in the previous version of this patch, this would be fine for you to allocate more memory as you have a lot of memory. Am I correct?
Yes, eMAG can go upto 1TB of RAM. We will reformat commit description.
Quoted 11 lines
Quoted 8 lines
Quoted 6 lines
I can't remember which other platforms support 42-bits PA. I think at that time it was X-Gene. As long as no current embedded platform we support use 42-bit PA, this change may be ok. Stefano do you recall what was the platform?
Ampere eMAG platform is essentially the continuation of X-Gene. These systems are targeted as servers with upto 1TB of RAM.
So my memory hasn't failed yet :).
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Hi,
Quoted 14 lines · Feng Kan OS
Thanks Julien.
Quoted 11 lines · Julien Grall
Hi,
Thank you for posting the patch.
Title: No need for full stop in the commit title.
On 15/03/2019 08:34, Vishnu Pajjuri OS wrote:
I can't remember which other platforms support 42-bits PA. I think at that time it was X-Gene. As long as no current embedded platform we support use 42-bit PA, this change may be ok. Stefano do you recall what was the platform?
Quoted 6 lines
Ampere eMAG platform is essentially the continuation of X-Gene. These systems are targeted as servers with upto 1TB of RAM.
Quoted 3 lines
In any case, the new behavior (and consequence) needs to be clearly explained in the commit message.
Got it, we will resubmit if Stefano is okay with the change.
To make progress on this patch, I would suggest to resubmit it with the changes requested.
Cheers,
Signature · 6 lines
Julien Grall _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 20 lines · Julien Grall
Hi,
Quoted 17 lines · Feng Kan OS
Thanks Julien.
Quoted 11 lines · Julien Grall
Hi,
Thank you for posting the patch.
Title: No need for full stop in the commit title.
On 15/03/2019 08:34, Vishnu Pajjuri OS wrote:
I can't remember which other platforms support 42-bits PA. I think at that time it was X-Gene. As long as no current embedded platform we support use 42-bit PA, this change may be ok. Stefano do you recall what was the platform?Ampere eMAG platform is essentially the continuation of X-Gene. These systems are targeted as servers with upto 1TB of RAM.
Quoted 1 line
Quoted 6 lines
Quoted 3 lines
Quoted 2 lines
In any case, the new behavior (and consequence) needs to be clearly explained in the commit message.
Got it, we will resubmit if Stefano is okay with the change.
To make progress on this patch, I would suggest to resubmit it with the changes requested.
Yes, please send the new patch. Sorry for the late reply.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel