diff --git a/xen/arch/x86/alternative.c b/xen/arch/x86/alternative.c index 1d59dffc46..8356414be7 100644 --- a/xen/arch/x86/alternative.c +++ b/xen/arch/x86/alternative.c @@ -338,7 +338,7 @@ static void init_or_livepatch _apply_alternatives(struct alt_instr *start, * Clobber endbr64 instructions now that altcall has finished optimising * all indirect branches to direct ones. */ - if ( force && cpu_has_xen_ibt ) + if ( force && cpu_has_xen_ibt && system_state < SYS_STATE_active ) { void *const *val; unsigned int clobbered = 0;