1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _ASM_X86_TRAPNR_H
3#define _ASM_X86_TRAPNR_H
4
5/*
6 * Event type codes used by FRED, Intel VT-x and AMD SVM
7 */
8#define EVENT_TYPE_EXTINT 0 // External interrupt
9#define EVENT_TYPE_RESERVED 1
10#define EVENT_TYPE_NMI 2 // NMI
11#define EVENT_TYPE_HWEXC 3 // Hardware originated traps, exceptions
12#define EVENT_TYPE_SWINT 4 // INT n
13#define EVENT_TYPE_PRIV_SWEXC 5 // INT1
14#define EVENT_TYPE_SWEXC 6 // INTO, INT3
15#define EVENT_TYPE_OTHER 7 // FRED SYSCALL/SYSENTER, VT-x MTF
16
17/* Interrupts/Exceptions */
18
19#define X86_TRAP_DE 0 /* Divide-by-zero */
20#define X86_TRAP_DB 1 /* Debug */
21#define X86_TRAP_NMI 2 /* Non-maskable Interrupt */
22#define X86_TRAP_BP 3 /* Breakpoint */
23#define X86_TRAP_OF 4 /* Overflow */
24#define X86_TRAP_BR 5 /* Bound Range Exceeded */
25#define X86_TRAP_UD 6 /* Invalid Opcode */
26#define X86_TRAP_NM 7 /* Device Not Available */
27#define X86_TRAP_DF 8 /* Double Fault */
28#define X86_TRAP_OLD_MF 9 /* Coprocessor Segment Overrun */
29#define X86_TRAP_TS 10 /* Invalid TSS */
30#define X86_TRAP_NP 11 /* Segment Not Present */
31#define X86_TRAP_SS 12 /* Stack Segment Fault */
32#define X86_TRAP_GP 13 /* General Protection Fault */
33#define X86_TRAP_PF 14 /* Page Fault */
34#define X86_TRAP_SPURIOUS 15 /* Spurious Interrupt */
35#define X86_TRAP_MF 16 /* x87 Floating-Point Exception */
36#define X86_TRAP_AC 17 /* Alignment Check */
37#define X86_TRAP_MC 18 /* Machine Check */
38#define X86_TRAP_XF 19 /* SIMD Floating-Point Exception */
39#define X86_TRAP_VE 20 /* Virtualization Exception */
40#define X86_TRAP_CP 21 /* Control Protection Exception */
41#define X86_TRAP_VC 29 /* VMM Communication Exception */
42#define X86_TRAP_IRET 32 /* IRET Exception */
43
44#endif
45

source code of linux/arch/x86/include/asm/trapnr.h