Skip to contentSkip to conversation

tools: Sync x86's vmx.h with the kernel

tip:perf/core tip-bot for Arnaldo Carvalho de Melo 1 participant 1 message Jan 12, 2017

lore
Share & tools
lore
#0 lore raw
Commit-ID:  675f52b23743f396c585fc9d135435be37f320d8
Gitweb:     http://git.kernel.org/tip/675f52b23743f396c585fc9d135435be37f320d8
Author:     Arnaldo Carvalho de Melo <[email protected]>
AuthorDate: Tue, 10 Jan 2017 16:41:39 -0300
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Wed, 11 Jan 2017 16:48:02 -0300

tools: Sync x86's vmx.h with the kernel

To pick the changes from:

1b07304c587d ("KVM: nVMX: support descriptor table exits")

That adds entries to VMX_EXIT_REASONS, that is used by tools/perf/arch/x86/util/kvm-stat.c.

This also picks the changes in:

1dc35dacc16b ("KVM: nVMX: check host CR3 on vmentry and vmexit")

But these are not used in 'perf kvm stat', do it just to silence the kernel/tools file cache coherency detector:

  $ make -C tools/perf
  make: Entering directory '/home/acme/git/linux/tools/perf'
    BUILD:   Doing 'make -j4' parallel build
  Warning: arch/x86/include/uapi/asm/vmx.h differs from kernel
---
 tools/arch/x86/include/uapi/asm/vmx.h | 5 +++++
 1 file changed, 5 insertions(+)
tools/arch/x86/include/uapi/asm/vmx.h +5 -0
index 37fee27..1445865 100644
@@ -65,6 +65,8 @@
 #define EXIT_REASON_TPR_BELOW_THRESHOLD 43
 #define EXIT_REASON_APIC_ACCESS         44
 #define EXIT_REASON_EOI_INDUCED         45
+#define EXIT_REASON_GDTR_IDTR           46
+#define EXIT_REASON_LDTR_TR             47
 #define EXIT_REASON_EPT_VIOLATION       48
 #define EXIT_REASON_EPT_MISCONFIG       49
 #define EXIT_REASON_INVEPT              50
@@ -113,6 +115,8 @@
 	{ EXIT_REASON_MCE_DURING_VMENTRY,    "MCE_DURING_VMENTRY" }, \
 	{ EXIT_REASON_TPR_BELOW_THRESHOLD,   "TPR_BELOW_THRESHOLD" }, \
 	{ EXIT_REASON_APIC_ACCESS,           "APIC_ACCESS" }, \
+	{ EXIT_REASON_GDTR_IDTR,	     "GDTR_IDTR" }, \
+	{ EXIT_REASON_LDTR_TR,		     "LDTR_TR" }, \
 	{ EXIT_REASON_EPT_VIOLATION,         "EPT_VIOLATION" }, \
 	{ EXIT_REASON_EPT_MISCONFIG,         "EPT_MISCONFIG" }, \
 	{ EXIT_REASON_INVEPT,                "INVEPT" }, \
@@ -129,6 +133,7 @@
 	{ EXIT_REASON_XRSTORS,               "XRSTORS" }
 
 #define VMX_ABORT_SAVE_GUEST_MSR_FAIL        1
+#define VMX_ABORT_LOAD_HOST_PDPTE_FAIL       2
 #define VMX_ABORT_LOAD_HOST_MSR_FAIL         4
 
 #endif /* _UAPIVMX_H */