1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_X86_TRAP_PF_H
3 #define _ASM_X86_TRAP_PF_H
6 * Page fault error code bits:
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 * bit 15 == 1: SGX MMU page-fault
16 enum x86_pf_error_code
{
18 X86_PF_WRITE
= 1 << 1,
21 X86_PF_INSTR
= 1 << 4,
26 #endif /* _ASM_X86_TRAP_PF_H */