Skip to content

Commit fddd076

Browse files
committed
KVM: x86: Define AMD's #HV, #VC, and #SX exception vectors
Add {HV,CP,SX}_VECTOR definitions for AMD's Hypervisor Injection Exception, VMM Communication Exception, and SVM Security Exception vectors, along with human friendly formatting for trace_kvm_inj_exception(). Note, KVM is all but guaranteed to never observe or inject #SX, and #HV is also unlikely to go unused. Add the architectural collateral mostly for completeness, and on the off chance that hardware goes off the rails. Link: https://lore.kernel.org/r/20250919223258.1604852-44-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
1 parent f2f5519 commit fddd076

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

arch/x86/include/uapi/asm/kvm.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@
3737
#define VE_VECTOR 20
3838
#define CP_VECTOR 21
3939

40+
#define HV_VECTOR 28
41+
#define VC_VECTOR 29
42+
#define SX_VECTOR 30
43+
4044
/* Select x86 specific features in <linux/kvm.h> */
4145
#define __KVM_HAVE_PIT
4246
#define __KVM_HAVE_IOAPIC

arch/x86/kvm/trace.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,8 @@ TRACE_EVENT(kvm_inj_virq,
462462
#define kvm_trace_sym_exc \
463463
EXS(DE), EXS(DB), EXS(BP), EXS(OF), EXS(BR), EXS(UD), EXS(NM), \
464464
EXS(DF), EXS(TS), EXS(NP), EXS(SS), EXS(GP), EXS(PF), EXS(MF), \
465-
EXS(AC), EXS(MC), EXS(XM), EXS(VE), EXS(CP)
465+
EXS(AC), EXS(MC), EXS(XM), EXS(VE), EXS(CP), \
466+
EXS(HV), EXS(VC), EXS(SX)
466467

467468
/*
468469
* Tracepoint for kvm interrupt injection:

0 commit comments

Comments
 (0)