[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] x86/boot: adjust text gap/diff to work with 64-bytes alignment too
On Thu, Jan 9, 2025 at 1:44 PM Andrew Cooper <andrew.cooper3@xxxxxxxxxx> wrote: > > On 09/01/2025 1:23 pm, Jan Beulich wrote: > > On 09.01.2025 14:15, Marek Marczykowski-Górecki wrote: > >> Xen compiled with -mtune=generic has .text alignment set to 64-bytes. > >> Having text_diff non-64-bytes-aligned breaks stuff: > >> > >> Traceback (most recent call last): > >> File > >> "/builddir/build/BUILD/xen-4.20.0-build/xen-4.20.0-rc0/xen/./tools/combine_two_binaries.py", > >> line 96, in <module> > >> raise Exception('File sizes do not match') > >> Exception: File sizes do not match: 70160 != 4080 + 66048 > >> > >> Adjust the numbers as suggested by Frediano to work with 64-bytes and > >> even 128-bytes alignment. > > And then breaking at 256? As indicated on Matrix, imo we should be able to > > cope with anything up to at least PAGE_SIZE. Or we should reduce .text > > alignment before linking. > > Do you have a concrete proposal on how to do this? > > Because if not, we've had 2 downstreams hit by this build failure, and > we probably ought to take this patch as a stopgap fix, and see about > doing the better fix for 4.20. > I agree with this, merge this and then leave the improvements for follow up(s). Yesterday I checked the output object file (built-in-32.o) to find that the output alignment is 1 byte, which is obviously wrong! There's no current requirement for page alignment. As page management is done in both 32 and 64 bit code, pages are allocated in other parts of the sources and handled correctly. Personally I prefer incremental development with sensible and self-contained improvements kept separate, instead of adding changes and changes because somebody touches a piece of code that can be improved. Usually any piece of code can be improved. Frediano
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |