trap_pf.h 709 B

1234567891011121314151617181920212223242526
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _ASM_X86_TRAP_PF_H
  3. #define _ASM_X86_TRAP_PF_H
  4. /*
  5. * Page fault error code bits:
  6. *
  7. * bit 0 == 0: no page found 1: protection fault
  8. * bit 1 == 0: read access 1: write access
  9. * bit 2 == 0: kernel-mode access 1: user-mode access
  10. * bit 3 == 1: use of reserved bit detected
  11. * bit 4 == 1: fault was an instruction fetch
  12. * bit 5 == 1: protection keys block access
  13. * bit 15 == 1: SGX MMU page-fault
  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. X86_PF_SGX = 1 << 15,
  23. };
  24. #endif /* _ASM_X86_TRAP_PF_H */