Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tools headers UAPI: Synch KVM's svm.h header with the kernel

To pick up the changes from:

d1949b93c60504b3 ("KVM: SVM: Add support for CR8 write traps for an SEV-ES guest")
5b51cb13160ae0ba ("KVM: SVM: Add support for CR4 write traps for an SEV-ES guest")
f27ad38aac23263c ("KVM: SVM: Add support for CR0 write traps for an SEV-ES guest")
2985afbcdbb1957a ("KVM: SVM: Add support for EFER write traps for an SEV-ES guest")
291bd20d5d88814a ("KVM: SVM: Add initial support for a VMGEXIT VMEXIT")

Picking these new SVM exit reasons:

+ { SVM_EXIT_EFER_WRITE_TRAP, "write_efer_trap" }, \
+ { SVM_EXIT_CR0_WRITE_TRAP, "write_cr0_trap" }, \
+ { SVM_EXIT_CR4_WRITE_TRAP, "write_cr4_trap" }, \
+ { SVM_EXIT_CR8_WRITE_TRAP, "write_cr8_trap" }, \
+ { SVM_EXIT_VMGEXIT, "vmgexit" }, \
+ { SVM_VMGEXIT_MMIO_READ, "vmgexit_mmio_read" }, \
+ { SVM_VMGEXIT_MMIO_WRITE, "vmgexit_mmio_write" }, \
+ { SVM_VMGEXIT_NMI_COMPLETE, "vmgexit_nmi_complete" }, \
+ { SVM_VMGEXIT_AP_HLT_LOOP, "vmgexit_ap_hlt_loop" }, \
+ { SVM_VMGEXIT_AP_JUMP_TABLE, "vmgexit_ap_jump_table" }, \

And address this perf build warning:

Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/svm.h' differs from latest version at 'arch/x86/include/uapi/asm/svm.h'
diff -u tools/arch/x86/include/uapi/asm/svm.h arch/x86/include/uapi/asm/svm.h

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

+28
+28
tools/arch/x86/include/uapi/asm/svm.h
··· 77 77 #define SVM_EXIT_MWAIT_COND 0x08c 78 78 #define SVM_EXIT_XSETBV 0x08d 79 79 #define SVM_EXIT_RDPRU 0x08e 80 + #define SVM_EXIT_EFER_WRITE_TRAP 0x08f 81 + #define SVM_EXIT_CR0_WRITE_TRAP 0x090 82 + #define SVM_EXIT_CR1_WRITE_TRAP 0x091 83 + #define SVM_EXIT_CR2_WRITE_TRAP 0x092 84 + #define SVM_EXIT_CR3_WRITE_TRAP 0x093 85 + #define SVM_EXIT_CR4_WRITE_TRAP 0x094 86 + #define SVM_EXIT_CR5_WRITE_TRAP 0x095 87 + #define SVM_EXIT_CR6_WRITE_TRAP 0x096 88 + #define SVM_EXIT_CR7_WRITE_TRAP 0x097 89 + #define SVM_EXIT_CR8_WRITE_TRAP 0x098 90 + #define SVM_EXIT_CR9_WRITE_TRAP 0x099 91 + #define SVM_EXIT_CR10_WRITE_TRAP 0x09a 92 + #define SVM_EXIT_CR11_WRITE_TRAP 0x09b 93 + #define SVM_EXIT_CR12_WRITE_TRAP 0x09c 94 + #define SVM_EXIT_CR13_WRITE_TRAP 0x09d 95 + #define SVM_EXIT_CR14_WRITE_TRAP 0x09e 96 + #define SVM_EXIT_CR15_WRITE_TRAP 0x09f 80 97 #define SVM_EXIT_INVPCID 0x0a2 81 98 #define SVM_EXIT_NPF 0x400 82 99 #define SVM_EXIT_AVIC_INCOMPLETE_IPI 0x401 83 100 #define SVM_EXIT_AVIC_UNACCELERATED_ACCESS 0x402 101 + #define SVM_EXIT_VMGEXIT 0x403 84 102 85 103 /* SEV-ES software-defined VMGEXIT events */ 86 104 #define SVM_VMGEXIT_MMIO_READ 0x80000001 ··· 201 183 { SVM_EXIT_MONITOR, "monitor" }, \ 202 184 { SVM_EXIT_MWAIT, "mwait" }, \ 203 185 { SVM_EXIT_XSETBV, "xsetbv" }, \ 186 + { SVM_EXIT_EFER_WRITE_TRAP, "write_efer_trap" }, \ 187 + { SVM_EXIT_CR0_WRITE_TRAP, "write_cr0_trap" }, \ 188 + { SVM_EXIT_CR4_WRITE_TRAP, "write_cr4_trap" }, \ 189 + { SVM_EXIT_CR8_WRITE_TRAP, "write_cr8_trap" }, \ 204 190 { SVM_EXIT_INVPCID, "invpcid" }, \ 205 191 { SVM_EXIT_NPF, "npf" }, \ 206 192 { SVM_EXIT_AVIC_INCOMPLETE_IPI, "avic_incomplete_ipi" }, \ 207 193 { SVM_EXIT_AVIC_UNACCELERATED_ACCESS, "avic_unaccelerated_access" }, \ 194 + { SVM_EXIT_VMGEXIT, "vmgexit" }, \ 195 + { SVM_VMGEXIT_MMIO_READ, "vmgexit_mmio_read" }, \ 196 + { SVM_VMGEXIT_MMIO_WRITE, "vmgexit_mmio_write" }, \ 197 + { SVM_VMGEXIT_NMI_COMPLETE, "vmgexit_nmi_complete" }, \ 198 + { SVM_VMGEXIT_AP_HLT_LOOP, "vmgexit_ap_hlt_loop" }, \ 199 + { SVM_VMGEXIT_AP_JUMP_TABLE, "vmgexit_ap_jump_table" }, \ 208 200 { SVM_EXIT_ERR, "invalid_guest_state" } 209 201 210 202