On 30.07.2019 11:35, Andrew Cooper wrote:
> On 30/07/2019 09:42, Jan Beulich wrote:
>> 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).
> 
> Come again?  This is ridiculous.
> 
> Objects in a section following foo.page_aligned should never end up in
> the tail of the final page of foo.page_aligned, because then they are in
> the wrong section.

How do you derive "wrong section"? Sections have an alignment and a
size. The latter doesn't need to be a multiple of the former. The
section ends wherever its size says it ends. Using this property is
actually desirable in other cases, to limit waste of space.

> A short TSS is a pain to deal with, but even you said you didn't like
> the xen_tss idea when you suggested it.
> 
> The name of the section is very deliberately not TSS specific, because
> there is plenty of other cleanup which will end up with objects in this
> section.

Well, if they're all strictly a multiple of PAGE_SIZE, then writing
down a respective requirement might be acceptable. But even then I
wouldn't be overly happy going that route.

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

Reply via email to