aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm/trace.h
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2010-08-02 06:51:07 -0400
committerAvi Kivity <avi@redhat.com>2010-10-24 04:52:02 -0400
commit4c4eea7769d0099ea09f9bdb7aed1cc61d57c9d6 (patch)
tree4a03091f6c7b9585859c8ad21ffedbf2b981c705 /arch/powerpc/kvm/trace.h
parent82fdee7bce546c3ce38dcf0db6096eea73dbe7bd (diff)
KVM: PPC: Add tracepoint for generic mmu map
This patch moves the generic mmu map debugging 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 8ed6f1c7c86..68a84442d79 100644
--- a/arch/powerpc/kvm/trace.h
+++ b/arch/powerpc/kvm/trace.h
@@ -181,6 +181,35 @@ TRACE_EVENT(kvm_book3s_64_mmu_map,
181 181
182#endif /* CONFIG_PPC_BOOK3S_64 */ 182#endif /* CONFIG_PPC_BOOK3S_64 */
183 183
184TRACE_EVENT(kvm_book3s_mmu_map,
185 TP_PROTO(struct hpte_cache *pte),
186 TP_ARGS(pte),
187
188 TP_STRUCT__entry(
189 __field( u64, host_va )
190 __field( u64, pfn )
191 __field( ulong, eaddr )
192 __field( u64, vpage )
193 __field( ulong, raddr )
194 __field( int, flags )
195 ),
196
197 TP_fast_assign(
198 __entry->host_va = pte->host_va;
199 __entry->pfn = pte->pfn;
200 __entry->eaddr = pte->pte.eaddr;
201 __entry->vpage = pte->pte.vpage;
202 __entry->raddr = pte->pte.raddr;
203 __entry->flags = (pte->pte.may_read ? 0x4 : 0) |
204 (pte->pte.may_write ? 0x2 : 0) |
205 (pte->pte.may_execute ? 0x1 : 0);
206 ),
207
208 TP_printk("Map: hva=%llx pfn=%llx ea=%lx vp=%llx ra=%lx [%x]",
209 __entry->host_va, __entry->pfn, __entry->eaddr,
210 __entry->vpage, __entry->raddr, __entry->flags)
211);
212
184#endif /* CONFIG_PPC_BOOK3S */ 213#endif /* CONFIG_PPC_BOOK3S */
185 214
186#endif /* _TRACE_KVM_H */ 215#endif /* _TRACE_KVM_H */