On 29.07.2019 19:38, Andrew Cooper wrote:
> --- a/xen/arch/x86/xen.lds.S
> +++ b/xen/arch/x86/xen.lds.S
> @@ -293,14 +293,17 @@ SECTIONS
>         __bss_start = .;
>         *(.bss.stack_aligned)
>         *(.bss.page_aligned*)
> -       *(.bss)
> -       . = ALIGN(SMP_CACHE_BYTES);
> +       . = ALIGN(PAGE_SIZE);
>         __per_cpu_start = .;
> +       *(.bss.percpu.page_aligned)
> +       . = ALIGN(PAGE_SIZE);

But this goes too far: What we want is for the TSS to occupy a full
page, not for whatever random other page-aligned object ends up
last here (should any every appear). If you want to effect this
via linker script (rather than C arrangements), then just like the
CPU0 stack I think we want a dedicated section containing _just_
the TSS. (Having said that I realize that .bss.stack_aligned isn't
really a good name for a dedicated section. It's just that we
obviously want the stack to occupy its entire STACK_SIZE range. Of
course we could put ourselves on the position that
.bss.percpu.page_aligned too _is_ a dedicated section despite its
name, but if you mean it to be like that then it would be nice for
the description to actually say so.)

Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to