summaryrefslogtreecommitdiff
path: root/arch/mips/kvm/trace.h
diff options
context:
space:
mode:
authorJames Hogan <james.hogan@imgtec.com>2016-06-14 11:40:13 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2016-06-14 12:16:23 +0300
commit9887d1c75ba2f210b403d536ab025d4b2b36fb57 (patch)
treeaf76426f0e2265dd0017b2a427d898a5f4f44116 /arch/mips/kvm/trace.h
parent1e09e86ac13747903501004082bf1c5b7c6262b2 (diff)
downloadlinux-9887d1c75ba2f210b403d536ab025d4b2b36fb57.tar.xz
MIPS: KVM: Add kvm_asid_change trace event
Add a trace event for guest ASID changes, replacing the existing kvm_debug call. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Radim Krčmář <rkrcmar@redhat.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: kvm@vger.kernel.org Cc: linux-mips@linux-mips.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/mips/kvm/trace.h')
-rw-r--r--arch/mips/kvm/trace.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/mips/kvm/trace.h b/arch/mips/kvm/trace.h
index ffa6ee8f2025..7daf7474d6a6 100644
--- a/arch/mips/kvm/trace.h
+++ b/arch/mips/kvm/trace.h
@@ -122,6 +122,28 @@ TRACE_EVENT(kvm_aux,
__entry->pc)
);
+TRACE_EVENT(kvm_asid_change,
+ TP_PROTO(struct kvm_vcpu *vcpu, unsigned int old_asid,
+ unsigned int new_asid),
+ TP_ARGS(vcpu, old_asid, new_asid),
+ TP_STRUCT__entry(
+ __field(unsigned long, pc)
+ __field(u8, old_asid)
+ __field(u8, new_asid)
+ ),
+
+ TP_fast_assign(
+ __entry->pc = vcpu->arch.pc;
+ __entry->old_asid = old_asid;
+ __entry->new_asid = new_asid;
+ ),
+
+ TP_printk("PC: 0x%08lx old: 0x%02x new: 0x%02x",
+ __entry->pc,
+ __entry->old_asid,
+ __entry->new_asid)
+);
+
#endif /* _TRACE_KVM_H */
/* This part must be outside protection */