summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm/trace.h
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2010-08-02 12:55:19 +0200
committerAvi Kivity <avi@redhat.com>2010-10-24 10:52:03 +0200
commit8696ee431233171b3c1cc82bae0193efc4fef2ac (patch)
treeee3f85a7501d0b40901bb9c310bf90ad3984680b /arch/powerpc/kvm/trace.h
parent4c4eea7769d0099ea09f9bdb7aed1cc61d57c9d6 (diff)
KVM: PPC: Move pte invalidate debug code to tracepoint
This patch moves the SPTE flush debug printk over to tracepoints. Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc/kvm/trace.h')
-rw-r--r--arch/powerpc/kvm/trace.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/trace.h b/arch/powerpc/kvm/trace.h
index 68a84442d79..06ad93e4064 100644
--- a/arch/powerpc/kvm/trace.h
+++ b/arch/powerpc/kvm/trace.h
@@ -210,6 +210,35 @@ TRACE_EVENT(kvm_book3s_mmu_map,
__entry->vpage, __entry->raddr, __entry->flags)
);
+TRACE_EVENT(kvm_book3s_mmu_invalidate,
+ TP_PROTO(struct hpte_cache *pte),
+ TP_ARGS(pte),
+
+ TP_STRUCT__entry(
+ __field( u64, host_va )
+ __field( u64, pfn )
+ __field( ulong, eaddr )
+ __field( u64, vpage )
+ __field( ulong, raddr )
+ __field( int, flags )
+ ),
+
+ TP_fast_assign(
+ __entry->host_va = pte->host_va;
+ __entry->pfn = pte->pfn;
+ __entry->eaddr = pte->pte.eaddr;
+ __entry->vpage = pte->pte.vpage;
+ __entry->raddr = pte->pte.raddr;
+ __entry->flags = (pte->pte.may_read ? 0x4 : 0) |
+ (pte->pte.may_write ? 0x2 : 0) |
+ (pte->pte.may_execute ? 0x1 : 0);
+ ),
+
+ TP_printk("Flush: hva=%llx pfn=%llx ea=%lx vp=%llx ra=%lx [%x]",
+ __entry->host_va, __entry->pfn, __entry->eaddr,
+ __entry->vpage, __entry->raddr, __entry->flags)
+);
+
#endif /* CONFIG_PPC_BOOK3S */
#endif /* _TRACE_KVM_H */