All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: arm/arm64: Output Guest cntvoff value
@ 2016-01-01 18:58 amittomer25
  2016-01-04 14:23 ` Christoffer Dall
  0 siblings, 1 reply; 5+ messages in thread
From: amittomer25 @ 2016-01-01 18:58 UTC (permalink / raw)
  To: kvmarm; +Cc: marc.zyngier, andre.przywara

From: Amit Tomar <amittomer25@gmail.com>

This provides an easy access to guest's CVTVOFF value, somewhat
similar to how x86 outputs TSC offset value.

Signed-off-by: Amit Singh Tomar <amittomer25@gmail.com>
---
 virt/kvm/arm/arch_timer.c |    1 +
 virt/kvm/arm/trace.h      |   15 +++++++++++++++
 2 files changed, 16 insertions(+)

diff --git a/virt/kvm/arm/arch_timer.c b/virt/kvm/arm/arch_timer.c
index 69bca18..b0800fe 100644
--- a/virt/kvm/arm/arch_timer.c
+++ b/virt/kvm/arm/arch_timer.c
@@ -466,4 +466,5 @@ void kvm_timer_enable(struct kvm *kvm)
 void kvm_timer_init(struct kvm *kvm)
 {
 	kvm->arch.timer.cntvoff = kvm_phys_timer_read();
+	trace_kvm_timer_init(kvm->arch.timer.cntvoff);
 }
diff --git a/virt/kvm/arm/trace.h b/virt/kvm/arm/trace.h
index 37d8b98..c7e1c2f 100644
--- a/virt/kvm/arm/trace.h
+++ b/virt/kvm/arm/trace.h
@@ -52,6 +52,21 @@ TRACE_EVENT(kvm_timer_update_irq,
 		  __entry->vcpu_id, __entry->irq, __entry->level)
 );
 
+TRACE_EVENT(kvm_timer_init,
+	TP_PROTO(unsigned long long cntvoff),
+	TP_ARGS(cntvoff),
+
+	TP_STRUCT__entry(
+		__field(	unsigned long long, cntvoff)
+	),
+
+	TP_fast_assign(
+		__entry->cntvoff	= cntvoff;
+	),
+
+	TP_printk("CNTVOFF: %llx", __entry->cntvoff)
+);
+
 #endif /* _TRACE_KVM_H */
 
 #undef TRACE_INCLUDE_PATH
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-01-11 19:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-01 18:58 [PATCH] KVM: arm/arm64: Output Guest cntvoff value amittomer25
2016-01-04 14:23 ` Christoffer Dall
2016-01-10 17:25   ` Amit Tomer
2016-01-10 19:26     ` Christoffer Dall
2016-01-11 19:19       ` Amit Tomer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.