On Tue, Apr 18, 2023 at 01:17:55PM +0100, Andrew Cooper wrote: > 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.
Right, Jan has expressed a similar opinion. > 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. I don't see much issue in using the Linux macros, if we agree we want those. Some of those would likely be unused, do we want to import it wholesale, or just introduce the ones required? Initially I might just introduce SYM_FUNC_START{,_LOCAL}() and SYM_FUNC_END(). > 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. Sure. Thanks, Roger.