[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/8] x86/boot: Fix data placement around __high_start()



On 02/12/2021 11:49, Jan Beulich wrote:
> On 30.11.2021 11:04, Andrew Cooper wrote:
>> multiboot_ptr should be in __initdata - it is only used on the BSP path.
>> Furthermore, the .align 8 then .long means that stack_start is misaligned.
>>
>> Move both into setup.c, which lets the compiler handle the details correctly,
>> as well as providling proper debug information for them.
>>
>> Declare stack_start in setup.h and avoid extern-ing it locally in smpboot.c.
>>
>> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>

Thanks.

> Nevertheless I'd like to state that defining a variable in C when all
> its uses are in assembly seems a little odd to me.

I don't see it as odd, although I admit that I did try to see if I could
remove multiboot_ptr entirely first.  Xen is after all a single
freestanding binary.

Having the debug information (well - at a minimum, ELF size info) is
important for livepatch binary diffing, and nothing in asm by default
gets any of that.

Letting the compiler do this all for us is physically shorter, and less
prone to errors.

~Andrew



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.