]> xenbits.xensource.com Git - unikraft/unikraft.git/commitdiff
plat/common/x86: Fix control protection trap
authorMarc Rittinghaus <marc.rittinghaus@kit.edu>
Mon, 14 Jun 2021 09:47:16 +0000 (11:47 +0200)
committerUnikraft <monkey@unikraft.io>
Thu, 17 Jun 2021 08:54:39 +0000 (08:54 +0000)
The current trap number for the control protection exception (in
Unikraft called security trap) is wrong and the asm trap is missing. This
patch fixes these issues.

Signed-off-by: Marc Rittinghaus <marc.rittinghaus@kit.edu>
Reviewed-by: Simon Kuenzer <simon.kuenzer@neclab.eu>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Pull-Request: #228

plat/common/include/x86/traps.h

index 9fd9a4920ece76f5bbc17cd7f433adf45ce45933..1ac680b51b01302a6cd8b39543bf7b01f18d9101 100644 (file)
@@ -55,7 +55,7 @@
 #define TRAP_machine_check       18
 #define TRAP_simd_error          19
 #define TRAP_virt_error          20
-#define TRAP_security_error      30
+#define TRAP_security_error      21
 
 #define ASM_TRAP_SYM(trapname)   asm_trap_##trapname
 
@@ -87,7 +87,7 @@ DECLARE_ASM_TRAP(alignment_check);
 DECLARE_ASM_TRAP(machine_check);
 DECLARE_ASM_TRAP(simd_error);
 DECLARE_ASM_TRAP(virt_error);
-
+DECLARE_ASM_TRAP(security_error);
 
 void do_unhandled_trap(int trapnr, char *str, struct __regs *regs,
                unsigned long error_code);