Skip to content

Commit f224dba

Browse files
minipli-osssean-jc
authored andcommitted
x86: Add vendor specific exception vectors
Intel and AMD have some vendor specific exception vectors, namely: - Intel only: #VE (20), - AMD only: #HV (28), #VC (29) and #SX (30). Also Intel's #XM (19) is called #XF for AMD. Add definitions for all of these and add comments stating they're vendor specific. Signed-off-by: Mathias Krause <minipli@grsecurity.net> Link: https://lore.kernel.org/r/20230413184219.36404-4-minipli@grsecurity.net Signed-off-by: Sean Christopherson <seanjc@google.com>
1 parent 8cfb268 commit f224dba

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

lib/x86/desc.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,11 @@ const char* exception_mnemonic(int vector)
129129
VEC(AC);
130130
VEC(MC);
131131
VEC(XM);
132+
VEC(VE);
132133
VEC(CP);
134+
VEC(HV);
135+
VEC(VC);
136+
VEC(SX);
133137
default: return "#??";
134138
#undef VEC
135139
}

lib/x86/processor.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,12 @@
3737
#define AC_VECTOR 17
3838
#define MC_VECTOR 18
3939
#define XM_VECTOR 19
40+
#define XF_VECTOR XM_VECTOR /* AMD */
41+
#define VE_VECTOR 20 /* Intel only */
4042
#define CP_VECTOR 21
43+
#define HV_VECTOR 28 /* AMD only */
44+
#define VC_VECTOR 29 /* AMD only */
45+
#define SX_VECTOR 30 /* AMD only */
4146

4247
#define X86_CR0_PE_BIT (0)
4348
#define X86_CR0_PE BIT(X86_CR0_PE_BIT)

0 commit comments

Comments
 (0)