x86: fix comment on super page alignment requirement
PATCH 1/1 x86: fix comment on super page alignment requirement
BOOTSTRAP_DIRECTMAP_END is gone. The comment in question should refer to BOOSTRAP_MAP_BASE and BOOTSTRAP_MAP_LIMIT instead.
Remove two trailing spaces while fixing the comment.
--- xen/arch/x86/setup.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
xen/arch/x86/setup.c +6 -5
@@ -944,12 +944,13 @@ void __init noreturn __start_xen(unsigned long mbi_p)/* * Iterate backwards over all superpage-aligned RAM regions. -* -* We require superpage alignment because the boot allocator is not yet -* initialised. Hence we can only map superpages in the address range -* 0 to BOOTSTRAP_DIRECTMAP_END, as this is guaranteed not to require +* +* We require superpage alignment because the boot allocator is +* not yet initialised. Hence we can only map superpages in the +* address range BOOTSTRAP_MAP_BASE to (BOOTSTRAP_MAP_BASE + +* BOOTSTRAP_MAP_LIMIT), as this is guaranteed not to require * dynamic allocation of pagetables. -* +* * As well as mapping superpages in that range, in preparation for * initialising the boot allocator, we also look for a region to which * we can relocate the dom0 kernel and other multiboot modules. Also, on
Signature · 7 lines
2.11.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 6 lines
Quoted 1 line
Quoted 1 line · On 24.09.18 at 12:38, <[email protected]> wrote:
xen/arch/x86/setup.c +0
-0@@ -944,12 +944,13 @@ void __init noreturn __start_xen(unsigned long mbi_p)/*
xen/arch/x86/setup.c void __init noreturn __start_xen(unsigned long mbi_p) · line 951
Quoted 10 lines
xen/arch/x86/setup.c +5
-4* Iterate backwards over all superpage-aligned RAM regions. -* -* We require superpage alignment because the boot allocator is not yet -* initialised. Hence we can only map superpages in the address range -* 0 to BOOTSTRAP_DIRECTMAP_END, as this is guaranteed not to require +* +* We require superpage alignment because the boot allocator is +* not yet initialised. Hence we can only map superpages in the +* address range BOOTSTRAP_MAP_BASE to (BOOTSTRAP_MAP_BASE + +* BOOTSTRAP_MAP_LIMIT), as this is guaranteed not to require
The upper bound is not a sum. But there's then also an apparent
disconnect: BOOTSTRAP_MAP_LIMIT != (ARRAY_SIZE(l2_identmap) << L2_PAGETABLE_SHIFT) afaict, yet the latter is what is used for mapping (and what matches the value of BOOTSTRAP_DIRECTMAP_END in 4.0.4).
Also, since you're touching almost the entire comment anyway, would you mind moving it down to where it belongs (immediately ahead of the for())? Over time more and more things got placed between the two.
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 14 lines · Jan Beulich
Quoted 14 lines
Quoted 1 line
Quoted 1 line · On 24.09.18 at 12:38, <[email protected]> wrote:
xen/arch/x86/setup.c +3
-4@@ -944,12 +944,13 @@ void __init noreturn __start_xen(unsigned long mbi_p)/* * Iterate backwards over all superpage-aligned RAM regions. -* -* We require superpage alignment because the boot allocator is not yet -* initialised. Hence we can only map superpages in the address range -* 0 to BOOTSTRAP_DIRECTMAP_END, as this is guaranteed not to require +* +* We require superpage alignment because the boot allocator is +* not yet initialised. Hence we can only map superpages in the
Quoted 8 lines
xen/arch/x86/setup.c void __init noreturn __start_xen(unsigned long mbi_p) · line 951
Quoted 2 lines
xen/arch/x86/setup.c +2
-0+* address range BOOTSTRAP_MAP_BASE to (BOOTSTRAP_MAP_BASE + +* BOOTSTRAP_MAP_LIMIT), as this is guaranteed not to require The upper bound is not a sum. But there's then also an apparent
disconnect:BOOTSTRAP_MAP_LIMIT!= (ARRAY_SIZE(l2_identmap)<<L2_PAGETABLE_SHIFT) afaict, yet the latter is what is used for mapping (and what matches the value ofBOOTSTRAP_DIRECTMAP_ENDin 4.0.4).
Yeah, I got a few surprises while reading that code. I'm trying to figure out what the limit should be at the moment.
After playing with early boot code for a few hours, I'm sure that not all of the three models described in common/page_alloc.c work.
Quoted 5 lines
Also, since you're touching almost the entire comment anyway, would you mind moving it down to where it belongs (immediately ahead of the
for())? Over time more and more things got placed between the two.
Will do.
Wei.
Quoted 4 lines
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 25 lines
Quoted 1 line
Quoted 1 line · On 24.09.18 at 15:39, <[email protected]> wrote:
Quoted 14 lines · Jan Beulich
Quoted 14 lines
Quoted 1 line
Quoted 1 line · On 24.09.18 at 12:38, <[email protected]> wrote:
xen/arch/x86/setup.c +3
-4@@ -944,12 +944,13 @@ void __init noreturn __start_xen(unsigned long mbi_p)/* * Iterate backwards over all superpage-aligned RAM regions. -* -* We require superpage alignment because the boot allocator is not yet -* initialised. Hence we can only map superpages in the address range -* 0 to BOOTSTRAP_DIRECTMAP_END, as this is guaranteed not to require +* +* We require superpage alignment because the boot allocator is +* not yet initialised. Hence we can only map superpages in the Quoted 8 lines
xen/arch/x86/setup.c void __init noreturn __start_xen(unsigned long mbi_p) · line 951
Quoted 2 lines
xen/arch/x86/setup.c +2
-0+* address range BOOTSTRAP_MAP_BASE to (BOOTSTRAP_MAP_BASE + +* BOOTSTRAP_MAP_LIMIT), as this is guaranteed not to require The upper bound is not a sum. But there's then also an apparent
disconnect:BOOTSTRAP_MAP_LIMIT!= (ARRAY_SIZE(l2_identmap)<<L2_PAGETABLE_SHIFT) afaict, yet the latter is what is used for mapping (and what matches the value ofBOOTSTRAP_DIRECTMAP_ENDin 4.0.4).
Quoted 2 lines
Yeah, I got a few surprises while reading that code. I'm trying to figure out what the limit should be at the moment.
4Gb
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel