]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
KVM: x86: Define AMD's #HV, #VC, and #SX exception vectors
authorSean Christopherson <seanjc@google.com>
Fri, 19 Sep 2025 22:32:50 +0000 (15:32 -0700)
committerSean Christopherson <seanjc@google.com>
Tue, 23 Sep 2025 16:29:03 +0000 (09:29 -0700)
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>
arch/x86/include/uapi/asm/kvm.h
arch/x86/kvm/trace.h

index 73e0e88a0a54e42fb5c6ddf3385df2d94ac1eaec..d420c9c066d48c9836854a12436e13b4d6aa9d35 100644 (file)
 #define VE_VECTOR 20
 #define CP_VECTOR 21
 
+#define HV_VECTOR 28
+#define VC_VECTOR 29
+#define SX_VECTOR 30
+
 /* Select x86 specific features in <linux/kvm.h> */
 #define __KVM_HAVE_PIT
 #define __KVM_HAVE_IOAPIC
index 322913dda6266adf21f0a51f3d330b017563649f..e79bc9cb71623bdf4b5e6bbd272c528649aa19d9 100644 (file)
@@ -462,7 +462,8 @@ TRACE_EVENT(kvm_inj_virq,
 #define kvm_trace_sym_exc                                              \
        EXS(DE), EXS(DB), EXS(BP), EXS(OF), EXS(BR), EXS(UD), EXS(NM),  \
        EXS(DF), EXS(TS), EXS(NP), EXS(SS), EXS(GP), EXS(PF), EXS(MF),  \
-       EXS(AC), EXS(MC), EXS(XM), EXS(VE), EXS(CP)
+       EXS(AC), EXS(MC), EXS(XM), EXS(VE), EXS(CP),                    \
+       EXS(HV), EXS(VC), EXS(SX)
 
 /*
  * Tracepoint for kvm interrupt injection: