On 07.06.2023 11:01, Roger Pau Monne wrote:
> Guard it with CONFIG_LIVEPATCH.  Note alternatives are applied at boot
> using _apply_alternatives().
> 
> Signed-off-by: Roger Pau Monné <roger....@citrix.com>
> Reviewed-by: Julien Grall <jgr...@amazon.com>

Reviewed-by: Jan Beulich <jbeul...@suse.com>
albeit the implicit ack therein is only on the assumption that (apart
from me) it is generally deemed better ...

> --- a/xen/arch/x86/alternative.c
> +++ b/xen/arch/x86/alternative.c
> @@ -358,11 +358,12 @@ static void init_or_livepatch 
> _apply_alternatives(struct alt_instr *start,
>      }
>  }
>  
> -void init_or_livepatch apply_alternatives(struct alt_instr *start,
> -                                          struct alt_instr *end)
> +#ifdef CONFIG_LIVEPATCH

... to have the #ifdef than the init_or_livepatch attribute.

Jan

> +void apply_alternatives(struct alt_instr *start, struct alt_instr *end)
>  {
>      _apply_alternatives(start, end, true);
>  }
> +#endif
>  
>  static unsigned int __initdata alt_todo;
>  static unsigned int __initdata alt_done;


Reply via email to