.endr
        UNWIND_HINT_IRET_REGS offset=16
 SYM_CODE_END(early_idt_handler_array)
+       ANNOTATE_NOENDBR // early_idt_handler_array[NUM_EXCEPTION_VECTORS]
 
 SYM_CODE_START_LOCAL(early_idt_handler_common)
        /*
 
        TRAP_ENTRY(exc_coprocessor_error,               false ),
        TRAP_ENTRY(exc_alignment_check,                 false ),
        TRAP_ENTRY(exc_simd_coprocessor_error,          false ),
+#ifdef CONFIG_X86_KERNEL_IBT
+       TRAP_ENTRY(exc_control_protection,              false ),
+#endif
 };
 
 static bool __ref get_trap_addr(void **addr, unsigned int ist)
 
 .macro xen_pv_trap name
 SYM_CODE_START(xen_\name)
        UNWIND_HINT_EMPTY
+       ENDBR
        pop %rcx
        pop %r11
        jmp  \name
 xen_pv_trap asm_exc_spurious_interrupt_bug
 xen_pv_trap asm_exc_coprocessor_error
 xen_pv_trap asm_exc_alignment_check
+#ifdef CONFIG_X86_KERNEL_IBT
+xen_pv_trap asm_exc_control_protection
+#endif
 #ifdef CONFIG_X86_MCE
 xen_pv_trap asm_xenpv_exc_machine_check
 #endif /* CONFIG_X86_MCE */
        i = 0
        .rept NUM_EXCEPTION_VECTORS
        UNWIND_HINT_EMPTY
+       ENDBR
        pop %rcx
        pop %r11
        jmp early_idt_handler_array + i*EARLY_IDT_HANDLER_SIZE
 /* Normal 64-bit system call target */
 SYM_CODE_START(xen_syscall_target)
        UNWIND_HINT_EMPTY
+       ENDBR
        popq %rcx
        popq %r11
 
 /* 32-bit compat syscall target */
 SYM_CODE_START(xen_syscall32_target)
        UNWIND_HINT_EMPTY
+       ENDBR
        popq %rcx
        popq %r11
 
 /* 32-bit compat sysenter target */
 SYM_CODE_START(xen_sysenter_target)
        UNWIND_HINT_EMPTY
+       ENDBR
        /*
         * NB: Xen is polite and clears TF from EFLAGS for us.  This means
         * that we don't need to guard against single step exceptions here.
 SYM_CODE_START(xen_syscall32_target)
 SYM_CODE_START(xen_sysenter_target)
        UNWIND_HINT_EMPTY
+       ENDBR
        lea 16(%rsp), %rsp      /* strip %rcx, %r11 */
        mov $-ENOSYS, %rax
        pushq $0
 
 SYM_CODE_START(hypercall_page)
        .rept (PAGE_SIZE / 32)
                UNWIND_HINT_FUNC
-               .skip 31, 0x90
-               RET
+               ANNOTATE_NOENDBR
+               ret
+               /*
+                * Xen will write the hypercall page, and sort out ENDBR.
+                */
+               .skip 31, 0xcc
        .endr
 
 #define HYPERCALL(n) \
 .pushsection .text
 SYM_CODE_START(asm_cpu_bringup_and_idle)
        UNWIND_HINT_EMPTY
+       ENDBR
 
        call cpu_bringup_and_idle
 SYM_CODE_END(asm_cpu_bringup_and_idle)