summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/mmutrace.h
diff options
context:
space:
mode:
authorXiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>2013-06-07 16:51:27 +0800
committerGleb Natapov <gleb@redhat.com>2013-06-27 14:20:37 +0300
commit089504c0d40a24fe37a108c0eda16a9e7b846f12 (patch)
tree26f08d707df244465b993a8af7ae6471ea152fa5 /arch/x86/kvm/mmutrace.h
parentf8f559422b6c6a05469dfde614b67789b6142cb5 (diff)
downloadop-kernel-dev-089504c0d40a24fe37a108c0eda16a9e7b846f12.zip
op-kernel-dev-089504c0d40a24fe37a108c0eda16a9e7b846f12.tar.gz
KVM: MMU: add tracepoint for check_mmio_spte
It is useful for debug mmio spte invalidation Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com> Reviewed-by: Gleb Natapov <gleb@redhat.com> Reviewed-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/mmutrace.h')
-rw-r--r--arch/x86/kvm/mmutrace.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/x86/kvm/mmutrace.h b/arch/x86/kvm/mmutrace.h
index ad24757..9d2e0ff 100644
--- a/arch/x86/kvm/mmutrace.h
+++ b/arch/x86/kvm/mmutrace.h
@@ -298,6 +298,30 @@ TRACE_EVENT(
__entry->mmu_valid_gen, __entry->mmu_used_pages
)
);
+
+
+TRACE_EVENT(
+ check_mmio_spte,
+ TP_PROTO(u64 spte, unsigned int kvm_gen, unsigned int spte_gen),
+ TP_ARGS(spte, kvm_gen, spte_gen),
+
+ TP_STRUCT__entry(
+ __field(unsigned int, kvm_gen)
+ __field(unsigned int, spte_gen)
+ __field(u64, spte)
+ ),
+
+ TP_fast_assign(
+ __entry->kvm_gen = kvm_gen;
+ __entry->spte_gen = spte_gen;
+ __entry->spte = spte;
+ ),
+
+ TP_printk("spte %llx kvm_gen %x spte-gen %x valid %d", __entry->spte,
+ __entry->kvm_gen, __entry->spte_gen,
+ __entry->kvm_gen == __entry->spte_gen
+ )
+);
#endif /* _TRACE_KVMMMU_H */
#undef TRACE_INCLUDE_PATH
OpenPOWER on IntegriCloud