summaryrefslogtreecommitdiff
path: root/arch/x86/kvm/trace.h
diff options
context:
space:
mode:
authorSean Christopherson <sean.j.christopherson@intel.com>2019-07-11 18:58:30 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2019-09-11 18:34:17 +0300
commit380e0055bc7e4a5c687436ba3ccebb4667836b95 (patch)
tree4aaa889a67f97f63b75f1e449c25eb4917f946ac /arch/x86/kvm/trace.h
parent5497b95567c1b7b264dbb80d3608119e18aa4c07 (diff)
downloadlinux-380e0055bc7e4a5c687436ba3ccebb4667836b95.tar.xz
KVM: nVMX: trace nested VM-Enter failures detected by H/W
Use the recently added tracepoint for logging nested VM-Enter failures instead of spamming the kernel log when hardware detects a consistency check failure. Take the opportunity to print the name of the error code instead of dumping the raw hex number, but limit the symbol table to error codes that can reasonably be encountered by KVM. Add an equivalent tracepoint in nested_vmx_check_vmentry_hw(), e.g. so that tracing of "invalid control field" errors isn't suppressed when nested early checks are enabled. Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/trace.h')
-rw-r--r--arch/x86/kvm/trace.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/x86/kvm/trace.h b/arch/x86/kvm/trace.h
index 25ea92873e49..7c741a0c5f80 100644
--- a/arch/x86/kvm/trace.h
+++ b/arch/x86/kvm/trace.h
@@ -1479,18 +1479,21 @@ TRACE_EVENT(kvm_pv_tlb_flush,
* Tracepoint for failed nested VMX VM-Enter.
*/
TRACE_EVENT(kvm_nested_vmenter_failed,
- TP_PROTO(const char *msg),
- TP_ARGS(msg),
+ TP_PROTO(const char *msg, u32 err),
+ TP_ARGS(msg, err),
TP_STRUCT__entry(
__field(const char *, msg)
+ __field(u32, err)
),
TP_fast_assign(
__entry->msg = msg;
+ __entry->err = err;
),
- TP_printk("%s", __entry->msg)
+ TP_printk("%s%s", __entry->msg, !__entry->err ? "" :
+ __print_symbolic(__entry->err, VMX_VMENTER_INSTRUCTION_ERRORS))
);
#endif /* _TRACE_KVM_H */