diff options
author | Alexander Graf <agraf@suse.de> | 2010-08-02 06:55:19 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-10-24 04:52:03 -0400 |
commit | 8696ee431233171b3c1cc82bae0193efc4fef2ac (patch) | |
tree | ee3f85a7501d0b40901bb9c310bf90ad3984680b /arch/powerpc/kvm | |
parent | 4c4eea7769d0099ea09f9bdb7aed1cc61d57c9d6 (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')
-rw-r--r-- | arch/powerpc/kvm/book3s_mmu_hpte.c | 3 | ||||
-rw-r--r-- | arch/powerpc/kvm/trace.h | 29 |
2 files changed, 30 insertions, 2 deletions
diff --git a/arch/powerpc/kvm/book3s_mmu_hpte.c b/arch/powerpc/kvm/book3s_mmu_hpte.c index ac94bd99256..3397152a2b2 100644 --- a/arch/powerpc/kvm/book3s_mmu_hpte.c +++ b/arch/powerpc/kvm/book3s_mmu_hpte.c | |||
@@ -104,8 +104,7 @@ static void invalidate_pte(struct kvm_vcpu *vcpu, struct hpte_cache *pte) | |||
104 | if (hlist_unhashed(&pte->list_pte)) | 104 | if (hlist_unhashed(&pte->list_pte)) |
105 | return; | 105 | return; |
106 | 106 | ||
107 | dprintk_mmu("KVM: Flushing SPT: 0x%lx (0x%llx) -> 0x%llx\n", | 107 | trace_kvm_book3s_mmu_invalidate(pte); |
108 | pte->pte.eaddr, pte->pte.vpage, pte->host_va); | ||
109 | 108 | ||
110 | /* Different for 32 and 64 bit */ | 109 | /* Different for 32 and 64 bit */ |
111 | kvmppc_mmu_invalidate_pte(vcpu, pte); | 110 | kvmppc_mmu_invalidate_pte(vcpu, pte); |
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, | |||
210 | __entry->vpage, __entry->raddr, __entry->flags) | 210 | __entry->vpage, __entry->raddr, __entry->flags) |
211 | ); | 211 | ); |
212 | 212 | ||
213 | TRACE_EVENT(kvm_book3s_mmu_invalidate, | ||
214 | TP_PROTO(struct hpte_cache *pte), | ||
215 | TP_ARGS(pte), | ||
216 | |||
217 | TP_STRUCT__entry( | ||
218 | __field( u64, host_va ) | ||
219 | __field( u64, pfn ) | ||
220 | __field( ulong, eaddr ) | ||
221 | __field( u64, vpage ) | ||
222 | __field( ulong, raddr ) | ||
223 | __field( int, flags ) | ||
224 | ), | ||
225 | |||
226 | TP_fast_assign( | ||
227 | __entry->host_va = pte->host_va; | ||
228 | __entry->pfn = pte->pfn; | ||
229 | __entry->eaddr = pte->pte.eaddr; | ||
230 | __entry->vpage = pte->pte.vpage; | ||
231 | __entry->raddr = pte->pte.raddr; | ||
232 | __entry->flags = (pte->pte.may_read ? 0x4 : 0) | | ||
233 | (pte->pte.may_write ? 0x2 : 0) | | ||
234 | (pte->pte.may_execute ? 0x1 : 0); | ||
235 | ), | ||
236 | |||
237 | TP_printk("Flush: hva=%llx pfn=%llx ea=%lx vp=%llx ra=%lx [%x]", | ||
238 | __entry->host_va, __entry->pfn, __entry->eaddr, | ||
239 | __entry->vpage, __entry->raddr, __entry->flags) | ||
240 | ); | ||
241 | |||
213 | #endif /* CONFIG_PPC_BOOK3S */ | 242 | #endif /* CONFIG_PPC_BOOK3S */ |
214 | 243 | ||
215 | #endif /* _TRACE_KVM_H */ | 244 | #endif /* _TRACE_KVM_H */ |