On Wed, Jun 07, 2023 at 10:14:35AM +0200, Jan Beulich wrote: > On 06.06.2023 19:23, Roger Pau Monne wrote: > > --- a/xen/arch/x86/include/asm/alternative.h > > +++ b/xen/arch/x86/include/asm/alternative.h > > @@ -24,7 +24,9 @@ struct __packed alt_instr { > > > > extern void add_nops(void *insns, unsigned int len); > > /* Similar to alternative_instructions except it can be run with IRQs > > enabled. */ > > +#ifdef CONFIG_LIVEPATCH > > extern void apply_alternatives(struct alt_instr *start, struct alt_instr > > *end); > > +#endif > > I don't see the need for an #ifdef on the declaration. We avoid such > in a fair number of other cases, keeping the code better readable.
Hm, yes, we will get a linker error anyway if attempted to use without livepatch enabled. Thanks, Roger.