xref: /openbmc/linux/arch/x86/include/asm/trap_pf.h (revision 07d9a767)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_X86_TRAP_PF_H
3 #define _ASM_X86_TRAP_PF_H
4 
5 /*
6  * Page fault error code bits:
7  *
8  *   bit 0 ==	 0: no page found	1: protection fault
9  *   bit 1 ==	 0: read access		1: write access
10  *   bit 2 ==	 0: kernel-mode access	1: user-mode access
11  *   bit 3 ==				1: use of reserved bit detected
12  *   bit 4 ==				1: fault was an instruction fetch
13  *   bit 5 ==				1: protection keys block access
14  */
15 enum x86_pf_error_code {
16 	X86_PF_PROT	=		1 << 0,
17 	X86_PF_WRITE	=		1 << 1,
18 	X86_PF_USER	=		1 << 2,
19 	X86_PF_RSVD	=		1 << 3,
20 	X86_PF_INSTR	=		1 << 4,
21 	X86_PF_PK	=		1 << 5,
22 };
23 
24 #endif /* _ASM_X86_TRAP_PF_H */
25