* [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
* Re: [PATCH] KVM: arm/arm64: Output Guest cntvoff value
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
0 siblings, 1 reply; 5+ messages in thread
From: Christoffer Dall @ 2016-01-04 14:23 UTC (permalink / raw)
To: amittomer25; +Cc: marc.zyngier, andre.przywara, kvmarm
On Sat, Jan 02, 2016 at 12:28:29AM +0530, amittomer25@gmail.com wrote:
> 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>
Out of curiosity, what is the value of having this?
Thanks,
-Christoffer
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] KVM: arm/arm64: Output Guest cntvoff value
2016-01-04 14:23 ` Christoffer Dall
@ 2016-01-10 17:25 ` Amit Tomer
2016-01-10 19:26 ` Christoffer Dall
0 siblings, 1 reply; 5+ messages in thread
From: Amit Tomer @ 2016-01-10 17:25 UTC (permalink / raw)
To: Christoffer Dall; +Cc: Marc Zyngier, Andre Przywara, kvmarm
> Out of curiosity, what is the value of having this?
As we know that host and guest clocks are not in sync(Running at a
difference of CNTVOFF value initialized in guest). This value can be
used to correlate the trace event between host and guest.
Thanks,
Amit.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] KVM: arm/arm64: Output Guest cntvoff value
2016-01-10 17:25 ` Amit Tomer
@ 2016-01-10 19:26 ` Christoffer Dall
2016-01-11 19:19 ` Amit Tomer
0 siblings, 1 reply; 5+ messages in thread
From: Christoffer Dall @ 2016-01-10 19:26 UTC (permalink / raw)
To: Amit Tomer; +Cc: Marc Zyngier, Andre Przywara, kvmarm
On Sun, Jan 10, 2016 at 10:55:32PM +0530, Amit Tomer wrote:
> > Out of curiosity, what is the value of having this?
>
> As we know that host and guest clocks are not in sync(Running at a
> difference of CNTVOFF value initialized in guest). This value can be
> used to correlate the trace event between host and guest.
>
ok, I'm fine with this patch.
-Christoffer
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] KVM: arm/arm64: Output Guest cntvoff value
2016-01-10 19:26 ` Christoffer Dall
@ 2016-01-11 19:19 ` Amit Tomer
0 siblings, 0 replies; 5+ messages in thread
From: Amit Tomer @ 2016-01-11 19:19 UTC (permalink / raw)
To: Christoffer Dall; +Cc: Marc Zyngier, Andre Przywara, kvmarm
> ok, I'm fine with this patch.
ok, Thanks.
^ permalink raw reply [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.