On 18/04/2023 10:24 am, Roger Pau Monne wrote: > diff --git a/xen/arch/x86/x86_64/entry.S b/xen/arch/x86/x86_64/entry.S > index 7675a59ff057..c204634910c4 100644 > --- a/xen/arch/x86/x86_64/entry.S > +++ b/xen/arch/x86/x86_64/entry.S > @@ -660,7 +660,7 @@ ENTRY(early_page_fault) > > ALIGN > /* No special register assumptions. */ > -restore_all_xen: > +START_LP(restore_all_xen) > /* > * Check whether we need to switch to the per-CPU page tables, in > * case we return to late PV exit code (from an NMI or #MC). > @@ -677,6 +677,7 @@ UNLIKELY_END(exit_cr3) > > RESTORE_ALL adj=8 > iretq > +END_LP(restore_all_xen)
While it's useful to have a concrete idea of what is necessary to fix all of this, I do not wish to put in markers like this. This isn't about livepatching - it's about getting sane ELF metadata. This is why I had Jane work on using the Linux macros. They account for *all* interesting ELF metadata, as well as taking care of things like the global function alignment settings, CFI patching space, etc. Putting functions in separate sections should be hidden in the normal SYM_FUNC_START(), and dependent on CONFIG_SPLIT_SECTIONS behind the scenes seeing as we have that as a option already. ~Andrew