1 // SPDX-License-Identifier: GPL-2.0 2 #ifndef ARCH_PERF_RISCV_EXCEPTION_TYPES_H 3 #define ARCH_PERF_RISCV_EXCEPTION_TYPES_H 4 5 #define EXC_INST_MISALIGNED 0 6 #define EXC_INST_ACCESS 1 7 #define EXC_INST_ILLEGAL 2 8 #define EXC_BREAKPOINT 3 9 #define EXC_LOAD_MISALIGNED 4 10 #define EXC_LOAD_ACCESS 5 11 #define EXC_STORE_MISALIGNED 6 12 #define EXC_STORE_ACCESS 7 13 #define EXC_SYSCALL 8 14 #define EXC_HYPERVISOR_SYSCALL 9 15 #define EXC_SUPERVISOR_SYSCALL 10 16 #define EXC_INST_PAGE_FAULT 12 17 #define EXC_LOAD_PAGE_FAULT 13 18 #define EXC_STORE_PAGE_FAULT 15 19 #define EXC_INST_GUEST_PAGE_FAULT 20 20 #define EXC_LOAD_GUEST_PAGE_FAULT 21 21 #define EXC_VIRTUAL_INST_FAULT 22 22 #define EXC_STORE_GUEST_PAGE_FAULT 23 23 24 #define EXC(x) {EXC_##x, #x } 25 26 #define kvm_riscv_exception_class \ 27 EXC(INST_MISALIGNED), EXC(INST_ACCESS), EXC(INST_ILLEGAL), \ 28 EXC(BREAKPOINT), EXC(LOAD_MISALIGNED), EXC(LOAD_ACCESS), \ 29 EXC(STORE_MISALIGNED), EXC(STORE_ACCESS), EXC(SYSCALL), \ 30 EXC(HYPERVISOR_SYSCALL), EXC(SUPERVISOR_SYSCALL), \ 31 EXC(INST_PAGE_FAULT), EXC(LOAD_PAGE_FAULT), EXC(STORE_PAGE_FAULT), \ 32 EXC(INST_GUEST_PAGE_FAULT), EXC(LOAD_GUEST_PAGE_FAULT), \ 33 EXC(VIRTUAL_INST_FAULT), EXC(STORE_GUEST_PAGE_FAULT) 34 35 #endif /* ARCH_PERF_RISCV_EXCEPTION_TYPES_H */ 36