1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_X86_IDTENTRY_H
3 #define _ASM_X86_IDTENTRY_H
5 /* Interrupts/Exceptions */
6 #include <asm/trapnr.h>
9 #include <linux/entry-common.h>
10 #include <linux/hardirq.h>
12 #include <asm/irq_stack.h>
15 * DECLARE_IDTENTRY - Declare functions for simple IDT entry points
16 * No error code pushed by hardware
17 * @vector: Vector number (ignored for C)
18 * @func: Function name of the entry point
20 * Declares three functions:
21 * - The ASM entry point: asm_##func
22 * - The XEN PV trap entry point: xen_##func (maybe unused)
23 * - The C handler called from the ASM entry point
25 * Note: This is the C variant of DECLARE_IDTENTRY(). As the name says it
26 * declares the entry points for usage in C code. There is an ASM variant
27 * as well which is used to emit the entry stubs in entry_32/64.S.
29 #define DECLARE_IDTENTRY(vector, func) \
30 asmlinkage void asm_##func(void); \
31 asmlinkage void xen_asm_##func(void); \
32 __visible void func(struct pt_regs *regs)
35 * DEFINE_IDTENTRY - Emit code for simple IDT entry points
36 * @func: Function name of the entry point
38 * @func is called from ASM entry code with interrupts disabled.
40 * The macro is written so it acts as function definition. Append the
41 * body with a pair of curly brackets.
43 * irqentry_enter() contains common code which has to be invoked before
44 * arbitrary code in the body. irqentry_exit() contains common code
45 * which has to run before returning to the low level assembly code.
47 #define DEFINE_IDTENTRY(func) \
48 static __always_inline void __##func(struct pt_regs *regs); \
50 __visible noinstr void func(struct pt_regs *regs) \
52 irqentry_state_t state = irqentry_enter(regs); \
54 instrumentation_begin(); \
56 instrumentation_end(); \
57 irqentry_exit(regs, state); \
60 static __always_inline void __##func(struct pt_regs *regs)
62 /* Special case for 32bit IRET 'trap' */
63 #define DECLARE_IDTENTRY_SW DECLARE_IDTENTRY
64 #define DEFINE_IDTENTRY_SW DEFINE_IDTENTRY
67 * DECLARE_IDTENTRY_ERRORCODE - Declare functions for simple IDT entry points
68 * Error code pushed by hardware
69 * @vector: Vector number (ignored for C)
70 * @func: Function name of the entry point
72 * Declares three functions:
73 * - The ASM entry point: asm_##func
74 * - The XEN PV trap entry point: xen_##func (maybe unused)
75 * - The C handler called from the ASM entry point
77 * Same as DECLARE_IDTENTRY, but has an extra error_code argument for the
80 #define DECLARE_IDTENTRY_ERRORCODE(vector, func) \
81 asmlinkage void asm_##func(void); \
82 asmlinkage void xen_asm_##func(void); \
83 __visible void func(struct pt_regs *regs, unsigned long error_code)
86 * DEFINE_IDTENTRY_ERRORCODE - Emit code for simple IDT entry points
87 * Error code pushed by hardware
88 * @func: Function name of the entry point
90 * Same as DEFINE_IDTENTRY, but has an extra error_code argument
92 #define DEFINE_IDTENTRY_ERRORCODE(func) \
93 static __always_inline void __##func(struct pt_regs *regs, \
94 unsigned long error_code); \
96 __visible noinstr void func(struct pt_regs *regs, \
97 unsigned long error_code) \
99 irqentry_state_t state = irqentry_enter(regs); \
101 instrumentation_begin(); \
102 __##func (regs, error_code); \
103 instrumentation_end(); \
104 irqentry_exit(regs, state); \
107 static __always_inline void __##func(struct pt_regs *regs, \
108 unsigned long error_code)
111 * DECLARE_IDTENTRY_RAW - Declare functions for raw IDT entry points
112 * No error code pushed by hardware
113 * @vector: Vector number (ignored for C)
114 * @func: Function name of the entry point
116 * Maps to DECLARE_IDTENTRY().
118 #define DECLARE_IDTENTRY_RAW(vector, func) \
119 DECLARE_IDTENTRY(vector, func)
122 * DEFINE_IDTENTRY_RAW - Emit code for raw IDT entry points
123 * @func: Function name of the entry point
125 * @func is called from ASM entry code with interrupts disabled.
127 * The macro is written so it acts as function definition. Append the
128 * body with a pair of curly brackets.
130 * Contrary to DEFINE_IDTENTRY() this does not invoke the
131 * idtentry_enter/exit() helpers before and after the body invocation. This
132 * needs to be done in the body itself if applicable. Use if extra work
133 * is required before the enter/exit() helpers are invoked.
135 #define DEFINE_IDTENTRY_RAW(func) \
136 __visible noinstr void func(struct pt_regs *regs)
139 * DECLARE_IDTENTRY_RAW_ERRORCODE - Declare functions for raw IDT entry points
140 * Error code pushed by hardware
141 * @vector: Vector number (ignored for C)
142 * @func: Function name of the entry point
144 * Maps to DECLARE_IDTENTRY_ERRORCODE()
146 #define DECLARE_IDTENTRY_RAW_ERRORCODE(vector, func) \
147 DECLARE_IDTENTRY_ERRORCODE(vector, func)
150 * DEFINE_IDTENTRY_RAW_ERRORCODE - Emit code for raw IDT entry points
151 * @func: Function name of the entry point
153 * @func is called from ASM entry code with interrupts disabled.
155 * The macro is written so it acts as function definition. Append the
156 * body with a pair of curly brackets.
158 * Contrary to DEFINE_IDTENTRY_ERRORCODE() this does not invoke the
159 * irqentry_enter/exit() helpers before and after the body invocation. This
160 * needs to be done in the body itself if applicable. Use if extra work
161 * is required before the enter/exit() helpers are invoked.
163 #define DEFINE_IDTENTRY_RAW_ERRORCODE(func) \
164 __visible noinstr void func(struct pt_regs *regs, unsigned long error_code)
167 * DECLARE_IDTENTRY_IRQ - Declare functions for device interrupt IDT entry
168 * points (common/spurious)
169 * @vector: Vector number (ignored for C)
170 * @func: Function name of the entry point
172 * Maps to DECLARE_IDTENTRY_ERRORCODE()
174 #define DECLARE_IDTENTRY_IRQ(vector, func) \
175 DECLARE_IDTENTRY_ERRORCODE(vector, func)
178 * DEFINE_IDTENTRY_IRQ - Emit code for device interrupt IDT entry points
179 * @func: Function name of the entry point
181 * The vector number is pushed by the low level entry stub and handed
182 * to the function as error_code argument which needs to be truncated
183 * to an u8 because the push is sign extending.
185 * irq_enter/exit_rcu() are invoked before the function body and the
186 * KVM L1D flush request is set. Stack switching to the interrupt stack
187 * has to be done in the function body if necessary.
189 #define DEFINE_IDTENTRY_IRQ(func) \
190 static void __##func(struct pt_regs *regs, u32 vector); \
192 __visible noinstr void func(struct pt_regs *regs, \
193 unsigned long error_code) \
195 irqentry_state_t state = irqentry_enter(regs); \
196 u32 vector = (u32)(u8)error_code; \
198 instrumentation_begin(); \
199 kvm_set_cpu_l1tf_flush_l1d(); \
200 run_irq_on_irqstack_cond(__##func, regs, vector); \
201 instrumentation_end(); \
202 irqentry_exit(regs, state); \
205 static noinline void __##func(struct pt_regs *regs, u32 vector)
208 * DECLARE_IDTENTRY_SYSVEC - Declare functions for system vector entry points
209 * @vector: Vector number (ignored for C)
210 * @func: Function name of the entry point
212 * Declares three functions:
213 * - The ASM entry point: asm_##func
214 * - The XEN PV trap entry point: xen_##func (maybe unused)
215 * - The C handler called from the ASM entry point
217 * Maps to DECLARE_IDTENTRY().
219 #define DECLARE_IDTENTRY_SYSVEC(vector, func) \
220 DECLARE_IDTENTRY(vector, func)
223 * DEFINE_IDTENTRY_SYSVEC - Emit code for system vector IDT entry points
224 * @func: Function name of the entry point
226 * irqentry_enter/exit() and irq_enter/exit_rcu() are invoked before the
227 * function body. KVM L1D flush request is set.
229 * Runs the function on the interrupt stack if the entry hit kernel mode
231 #define DEFINE_IDTENTRY_SYSVEC(func) \
232 static void __##func(struct pt_regs *regs); \
234 __visible noinstr void func(struct pt_regs *regs) \
236 irqentry_state_t state = irqentry_enter(regs); \
238 instrumentation_begin(); \
239 kvm_set_cpu_l1tf_flush_l1d(); \
240 run_sysvec_on_irqstack_cond(__##func, regs); \
241 instrumentation_end(); \
242 irqentry_exit(regs, state); \
245 static noinline void __##func(struct pt_regs *regs)
248 * DEFINE_IDTENTRY_SYSVEC_SIMPLE - Emit code for simple system vector IDT
250 * @func: Function name of the entry point
252 * Runs the function on the interrupted stack. No switch to IRQ stack and
253 * only the minimal __irq_enter/exit() handling.
255 * Only use for 'empty' vectors like reschedule IPI and KVM posted
258 #define DEFINE_IDTENTRY_SYSVEC_SIMPLE(func) \
259 static __always_inline void __##func(struct pt_regs *regs); \
261 __visible noinstr void func(struct pt_regs *regs) \
263 irqentry_state_t state = irqentry_enter(regs); \
265 instrumentation_begin(); \
267 kvm_set_cpu_l1tf_flush_l1d(); \
270 instrumentation_end(); \
271 irqentry_exit(regs, state); \
274 static __always_inline void __##func(struct pt_regs *regs)
277 * DECLARE_IDTENTRY_XENCB - Declare functions for XEN HV callback entry point
278 * @vector: Vector number (ignored for C)
279 * @func: Function name of the entry point
281 * Declares three functions:
282 * - The ASM entry point: asm_##func
283 * - The XEN PV trap entry point: xen_##func (maybe unused)
284 * - The C handler called from the ASM entry point
286 * Maps to DECLARE_IDTENTRY(). Distinct entry point to handle the 32/64-bit
289 #define DECLARE_IDTENTRY_XENCB(vector, func) \
290 DECLARE_IDTENTRY(vector, func)
294 * DECLARE_IDTENTRY_IST - Declare functions for IST handling IDT entry points
295 * @vector: Vector number (ignored for C)
296 * @func: Function name of the entry point
298 * Maps to DECLARE_IDTENTRY_RAW, but declares also the NOIST C handler
299 * which is called from the ASM entry point on user mode entry
301 #define DECLARE_IDTENTRY_IST(vector, func) \
302 DECLARE_IDTENTRY_RAW(vector, func); \
303 __visible void noist_##func(struct pt_regs *regs)
306 * DECLARE_IDTENTRY_VC - Declare functions for the VC entry point
307 * @vector: Vector number (ignored for C)
308 * @func: Function name of the entry point
310 * Maps to DECLARE_IDTENTRY_RAW_ERRORCODE, but declares also the
311 * safe_stack C handler.
313 #define DECLARE_IDTENTRY_VC(vector, func) \
314 DECLARE_IDTENTRY_RAW_ERRORCODE(vector, func); \
315 __visible noinstr void kernel_##func(struct pt_regs *regs, unsigned long error_code); \
316 __visible noinstr void user_##func(struct pt_regs *regs, unsigned long error_code)
319 * DEFINE_IDTENTRY_IST - Emit code for IST entry points
320 * @func: Function name of the entry point
322 * Maps to DEFINE_IDTENTRY_RAW
324 #define DEFINE_IDTENTRY_IST(func) \
325 DEFINE_IDTENTRY_RAW(func)
328 * DEFINE_IDTENTRY_NOIST - Emit code for NOIST entry points which
329 * belong to a IST entry point (MCE, DB)
330 * @func: Function name of the entry point. Must be the same as
331 * the function name of the corresponding IST variant
333 * Maps to DEFINE_IDTENTRY_RAW().
335 #define DEFINE_IDTENTRY_NOIST(func) \
336 DEFINE_IDTENTRY_RAW(noist_##func)
339 * DECLARE_IDTENTRY_DF - Declare functions for double fault
340 * @vector: Vector number (ignored for C)
341 * @func: Function name of the entry point
343 * Maps to DECLARE_IDTENTRY_RAW_ERRORCODE
345 #define DECLARE_IDTENTRY_DF(vector, func) \
346 DECLARE_IDTENTRY_RAW_ERRORCODE(vector, func)
349 * DEFINE_IDTENTRY_DF - Emit code for double fault
350 * @func: Function name of the entry point
352 * Maps to DEFINE_IDTENTRY_RAW_ERRORCODE
354 #define DEFINE_IDTENTRY_DF(func) \
355 DEFINE_IDTENTRY_RAW_ERRORCODE(func)
358 * DEFINE_IDTENTRY_VC_KERNEL - Emit code for VMM communication handler
359 when raised from kernel mode
360 * @func: Function name of the entry point
362 * Maps to DEFINE_IDTENTRY_RAW_ERRORCODE
364 #define DEFINE_IDTENTRY_VC_KERNEL(func) \
365 DEFINE_IDTENTRY_RAW_ERRORCODE(kernel_##func)
368 * DEFINE_IDTENTRY_VC_USER - Emit code for VMM communication handler
369 when raised from user mode
370 * @func: Function name of the entry point
372 * Maps to DEFINE_IDTENTRY_RAW_ERRORCODE
374 #define DEFINE_IDTENTRY_VC_USER(func) \
375 DEFINE_IDTENTRY_RAW_ERRORCODE(user_##func)
377 #else /* CONFIG_X86_64 */
380 * DECLARE_IDTENTRY_DF - Declare functions for double fault 32bit variant
381 * @vector: Vector number (ignored for C)
382 * @func: Function name of the entry point
384 * Declares two functions:
385 * - The ASM entry point: asm_##func
386 * - The C handler called from the C shim
388 #define DECLARE_IDTENTRY_DF(vector, func) \
389 asmlinkage void asm_##func(void); \
390 __visible void func(struct pt_regs *regs, \
391 unsigned long error_code, \
392 unsigned long address)
395 * DEFINE_IDTENTRY_DF - Emit code for double fault on 32bit
396 * @func: Function name of the entry point
398 * This is called through the doublefault shim which already provides
399 * cr2 in the address argument.
401 #define DEFINE_IDTENTRY_DF(func) \
402 __visible noinstr void func(struct pt_regs *regs, \
403 unsigned long error_code, \
404 unsigned long address)
406 #endif /* !CONFIG_X86_64 */
409 #define DECLARE_IDTENTRY_NMI DECLARE_IDTENTRY_RAW
410 #define DEFINE_IDTENTRY_NMI DEFINE_IDTENTRY_RAW
413 #define DECLARE_IDTENTRY_MCE DECLARE_IDTENTRY_IST
414 #define DEFINE_IDTENTRY_MCE DEFINE_IDTENTRY_IST
415 #define DEFINE_IDTENTRY_MCE_USER DEFINE_IDTENTRY_NOIST
417 #define DECLARE_IDTENTRY_DEBUG DECLARE_IDTENTRY_IST
418 #define DEFINE_IDTENTRY_DEBUG DEFINE_IDTENTRY_IST
419 #define DEFINE_IDTENTRY_DEBUG_USER DEFINE_IDTENTRY_NOIST
422 #else /* !__ASSEMBLY__ */
425 * The ASM variants for DECLARE_IDTENTRY*() which emit the ASM entry stubs.
427 #define DECLARE_IDTENTRY(vector, func) \
428 idtentry vector asm_##func func has_error_code=0
430 #define DECLARE_IDTENTRY_ERRORCODE(vector, func) \
431 idtentry vector asm_##func func has_error_code=1
433 /* Special case for 32bit IRET 'trap'. Do not emit ASM code */
434 #define DECLARE_IDTENTRY_SW(vector, func)
436 #define DECLARE_IDTENTRY_RAW(vector, func) \
437 DECLARE_IDTENTRY(vector, func)
439 #define DECLARE_IDTENTRY_RAW_ERRORCODE(vector, func) \
440 DECLARE_IDTENTRY_ERRORCODE(vector, func)
442 /* Entries for common/spurious (device) interrupts */
443 #define DECLARE_IDTENTRY_IRQ(vector, func) \
444 idtentry_irq vector func
446 /* System vector entries */
447 #define DECLARE_IDTENTRY_SYSVEC(vector, func) \
448 idtentry_sysvec vector func
451 # define DECLARE_IDTENTRY_MCE(vector, func) \
452 idtentry_mce_db vector asm_##func func
454 # define DECLARE_IDTENTRY_DEBUG(vector, func) \
455 idtentry_mce_db vector asm_##func func
457 # define DECLARE_IDTENTRY_DF(vector, func) \
458 idtentry_df vector asm_##func func
460 # define DECLARE_IDTENTRY_XENCB(vector, func) \
461 DECLARE_IDTENTRY(vector, func)
463 # define DECLARE_IDTENTRY_VC(vector, func) \
464 idtentry_vc vector asm_##func func
467 # define DECLARE_IDTENTRY_MCE(vector, func) \
468 DECLARE_IDTENTRY(vector, func)
470 /* No ASM emitted for DF as this goes through a C shim */
471 # define DECLARE_IDTENTRY_DF(vector, func)
473 /* No ASM emitted for XEN hypervisor callback */
474 # define DECLARE_IDTENTRY_XENCB(vector, func)
478 /* No ASM code emitted for NMI */
479 #define DECLARE_IDTENTRY_NMI(vector, func)
482 * ASM code to emit the common vector entry stubs where each stub is
483 * packed into 8 bytes.
485 * Note, that the 'pushq imm8' is emitted via '.byte 0x6a, vector' because
486 * GCC treats the local vector variable as unsigned int and would expand
487 * all vectors above 0x7F to a 5 byte push. The original code did an
488 * adjustment of the vector number to be in the signed byte range to avoid
489 * this. While clever it's mindboggling counterintuitive and requires the
490 * odd conversion back to a real vector number in the C entry points. Using
491 * .byte achieves the same thing and the only fixup needed in the C entry
492 * point is to mask off the bits above bit 7 because the push is sign
496 SYM_CODE_START(irq_entries_start)
497 vector=FIRST_EXTERNAL_VECTOR
498 .rept NR_EXTERNAL_VECTORS
499 UNWIND_HINT_IRET_REGS
502 jmp asm_common_interrupt
504 /* Ensure that the above is 8 bytes max */
508 SYM_CODE_END(irq_entries_start)
510 #ifdef CONFIG_X86_LOCAL_APIC
512 SYM_CODE_START(spurious_entries_start)
513 vector=FIRST_SYSTEM_VECTOR
514 .rept NR_SYSTEM_VECTORS
515 UNWIND_HINT_IRET_REGS
518 jmp asm_spurious_interrupt
520 /* Ensure that the above is 8 bytes max */
524 SYM_CODE_END(spurious_entries_start)
527 #endif /* __ASSEMBLY__ */
530 * The actual entry points. Note that DECLARE_IDTENTRY*() serves two
532 * - provide the function declarations when included from C-Code
533 * - emit the ASM stubs when included from entry_32/64.S
535 * This avoids duplicate defines and ensures that everything is consistent.
539 * Dummy trap number so the low level ASM macro vector number checks do not
540 * match which results in emitting plain IDTENTRY stubs without bells and
543 #define X86_TRAP_OTHER 0xFFFF
545 /* Simple exception entry points. No hardware error code */
546 DECLARE_IDTENTRY(X86_TRAP_DE, exc_divide_error);
547 DECLARE_IDTENTRY(X86_TRAP_OF, exc_overflow);
548 DECLARE_IDTENTRY(X86_TRAP_BR, exc_bounds);
549 DECLARE_IDTENTRY(X86_TRAP_NM, exc_device_not_available);
550 DECLARE_IDTENTRY(X86_TRAP_OLD_MF, exc_coproc_segment_overrun);
551 DECLARE_IDTENTRY(X86_TRAP_SPURIOUS, exc_spurious_interrupt_bug);
552 DECLARE_IDTENTRY(X86_TRAP_MF, exc_coprocessor_error);
553 DECLARE_IDTENTRY(X86_TRAP_XF, exc_simd_coprocessor_error);
555 /* 32bit software IRET trap. Do not emit ASM code */
556 DECLARE_IDTENTRY_SW(X86_TRAP_IRET, iret_error);
558 /* Simple exception entries with error code pushed by hardware */
559 DECLARE_IDTENTRY_ERRORCODE(X86_TRAP_TS, exc_invalid_tss);
560 DECLARE_IDTENTRY_ERRORCODE(X86_TRAP_NP, exc_segment_not_present);
561 DECLARE_IDTENTRY_ERRORCODE(X86_TRAP_SS, exc_stack_segment);
562 DECLARE_IDTENTRY_ERRORCODE(X86_TRAP_GP, exc_general_protection);
563 DECLARE_IDTENTRY_ERRORCODE(X86_TRAP_AC, exc_alignment_check);
565 /* Raw exception entries which need extra work */
566 DECLARE_IDTENTRY_RAW(X86_TRAP_UD, exc_invalid_op);
567 DECLARE_IDTENTRY_RAW(X86_TRAP_BP, exc_int3);
568 DECLARE_IDTENTRY_RAW_ERRORCODE(X86_TRAP_PF, exc_page_fault);
570 #ifdef CONFIG_X86_MCE
572 DECLARE_IDTENTRY_MCE(X86_TRAP_MC, exc_machine_check);
574 DECLARE_IDTENTRY_RAW(X86_TRAP_MC, exc_machine_check);
577 DECLARE_IDTENTRY_RAW(X86_TRAP_MC, xenpv_exc_machine_check);
583 #if defined(CONFIG_X86_64) && IS_ENABLED(CONFIG_KVM_INTEL)
585 * Special NOIST entry point for VMX which invokes this on the kernel
586 * stack. asm_exc_nmi() requires an IST to work correctly vs. the NMI
587 * 'executing' marker.
589 * On 32bit this just uses the regular NMI entry point because 32-bit does
592 DECLARE_IDTENTRY(X86_TRAP_NMI, exc_nmi_noist);
594 #define asm_exc_nmi_noist asm_exc_nmi
597 DECLARE_IDTENTRY_NMI(X86_TRAP_NMI, exc_nmi);
599 DECLARE_IDTENTRY_RAW(X86_TRAP_NMI, xenpv_exc_nmi);
604 DECLARE_IDTENTRY_DEBUG(X86_TRAP_DB, exc_debug);
606 DECLARE_IDTENTRY_RAW(X86_TRAP_DB, exc_debug);
609 DECLARE_IDTENTRY_RAW(X86_TRAP_DB, xenpv_exc_debug);
613 DECLARE_IDTENTRY_DF(X86_TRAP_DF, exc_double_fault);
615 DECLARE_IDTENTRY_RAW_ERRORCODE(X86_TRAP_DF, xenpv_exc_double_fault);
619 #ifdef CONFIG_AMD_MEM_ENCRYPT
620 DECLARE_IDTENTRY_VC(X86_TRAP_VC, exc_vmm_communication);
624 DECLARE_IDTENTRY_XENCB(X86_TRAP_OTHER, exc_xen_hypervisor_callback);
625 DECLARE_IDTENTRY_RAW(X86_TRAP_OTHER, exc_xen_unknown_trap);
628 /* Device interrupts common/spurious */
629 DECLARE_IDTENTRY_IRQ(X86_TRAP_OTHER, common_interrupt);
630 #ifdef CONFIG_X86_LOCAL_APIC
631 DECLARE_IDTENTRY_IRQ(X86_TRAP_OTHER, spurious_interrupt);
634 /* System vector entry points */
635 #ifdef CONFIG_X86_LOCAL_APIC
636 DECLARE_IDTENTRY_SYSVEC(ERROR_APIC_VECTOR, sysvec_error_interrupt);
637 DECLARE_IDTENTRY_SYSVEC(SPURIOUS_APIC_VECTOR, sysvec_spurious_apic_interrupt);
638 DECLARE_IDTENTRY_SYSVEC(LOCAL_TIMER_VECTOR, sysvec_apic_timer_interrupt);
639 DECLARE_IDTENTRY_SYSVEC(X86_PLATFORM_IPI_VECTOR, sysvec_x86_platform_ipi);
643 DECLARE_IDTENTRY(RESCHEDULE_VECTOR, sysvec_reschedule_ipi);
644 DECLARE_IDTENTRY_SYSVEC(IRQ_MOVE_CLEANUP_VECTOR, sysvec_irq_move_cleanup);
645 DECLARE_IDTENTRY_SYSVEC(REBOOT_VECTOR, sysvec_reboot);
646 DECLARE_IDTENTRY_SYSVEC(CALL_FUNCTION_SINGLE_VECTOR, sysvec_call_function_single);
647 DECLARE_IDTENTRY_SYSVEC(CALL_FUNCTION_VECTOR, sysvec_call_function);
650 #ifdef CONFIG_X86_LOCAL_APIC
651 # ifdef CONFIG_X86_MCE_THRESHOLD
652 DECLARE_IDTENTRY_SYSVEC(THRESHOLD_APIC_VECTOR, sysvec_threshold);
655 # ifdef CONFIG_X86_MCE_AMD
656 DECLARE_IDTENTRY_SYSVEC(DEFERRED_ERROR_VECTOR, sysvec_deferred_error);
659 # ifdef CONFIG_X86_THERMAL_VECTOR
660 DECLARE_IDTENTRY_SYSVEC(THERMAL_APIC_VECTOR, sysvec_thermal);
663 # ifdef CONFIG_IRQ_WORK
664 DECLARE_IDTENTRY_SYSVEC(IRQ_WORK_VECTOR, sysvec_irq_work);
668 #ifdef CONFIG_HAVE_KVM
669 DECLARE_IDTENTRY_SYSVEC(POSTED_INTR_VECTOR, sysvec_kvm_posted_intr_ipi);
670 DECLARE_IDTENTRY_SYSVEC(POSTED_INTR_WAKEUP_VECTOR, sysvec_kvm_posted_intr_wakeup_ipi);
671 DECLARE_IDTENTRY_SYSVEC(POSTED_INTR_NESTED_VECTOR, sysvec_kvm_posted_intr_nested_ipi);
674 #if IS_ENABLED(CONFIG_HYPERV)
675 DECLARE_IDTENTRY_SYSVEC(HYPERVISOR_CALLBACK_VECTOR, sysvec_hyperv_callback);
676 DECLARE_IDTENTRY_SYSVEC(HYPERV_REENLIGHTENMENT_VECTOR, sysvec_hyperv_reenlightenment);
677 DECLARE_IDTENTRY_SYSVEC(HYPERV_STIMER0_VECTOR, sysvec_hyperv_stimer0);
680 #if IS_ENABLED(CONFIG_ACRN_GUEST)
681 DECLARE_IDTENTRY_SYSVEC(HYPERVISOR_CALLBACK_VECTOR, sysvec_acrn_hv_callback);
684 #ifdef CONFIG_XEN_PVHVM
685 DECLARE_IDTENTRY_SYSVEC(HYPERVISOR_CALLBACK_VECTOR, sysvec_xen_hvm_callback);
688 #ifdef CONFIG_KVM_GUEST
689 DECLARE_IDTENTRY_SYSVEC(HYPERVISOR_CALLBACK_VECTOR, sysvec_kvm_asyncpf_interrupt);
692 #undef X86_TRAP_OTHER