Linux KVM/arm64 development list
 help / color / mirror / Atom feed
From: amittomer25@gmail.com
To: kvmarm@lists.cs.columbia.edu
Cc: marc.zyngier@arm.com, andre.przywara@arm.com
Subject: [PATCH] KVM: arm/arm64: Output Guest cntvoff value
Date: Sat,  2 Jan 2016 00:28:29 +0530	[thread overview]
Message-ID: <1451674709-31074-1-git-send-email-amittomer25@gmail.com> (raw)

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

             reply	other threads:[~2016-01-01 18:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-01 18:58 amittomer25 [this message]
2016-01-04 14:23 ` [PATCH] KVM: arm/arm64: Output Guest cntvoff value Christoffer Dall
2016-01-10 17:25   ` Amit Tomer
2016-01-10 19:26     ` Christoffer Dall
2016-01-11 19:19       ` Amit Tomer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1451674709-31074-1-git-send-email-amittomer25@gmail.com \
    --to=amittomer25@gmail.com \
    --cc=andre.przywara@arm.com \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=marc.zyngier@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox