KVM ARM Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] KVM: arm/arm64: show halt poll counters in debugfs
@ 2019-10-27  8:19 Christian Borntraeger
  2019-10-29 10:23 ` Marc Zyngier
  0 siblings, 1 reply; 2+ messages in thread
From: Christian Borntraeger @ 2019-10-27  8:19 UTC (permalink / raw)
  To: Marc Zyngier; +Cc: kvm, linux-kernel, Christian Borntraeger, kvmarm

ARM/ARM64 has counters halt_successful_poll, halt_attempted_poll,
halt_poll_invalid, and halt_wakeup but never exposed those in debugfs.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
---
This patch is untested
 arch/arm/kvm/guest.c   | 4 ++++
 arch/arm64/kvm/guest.c | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/arch/arm/kvm/guest.c b/arch/arm/kvm/guest.c
index 684cf64..6696464 100644
--- a/arch/arm/kvm/guest.c
+++ b/arch/arm/kvm/guest.c
@@ -21,6 +21,10 @@
 #define VCPU_STAT(x) { #x, offsetof(struct kvm_vcpu, stat.x), KVM_STAT_VCPU }
 
 struct kvm_stats_debugfs_item debugfs_entries[] = {
+	VCPU_STAT(halt_successful_poll),
+	VCPU_STAT(halt_attempted_poll),
+	VCPU_STAT(halt_poll_invalid),
+	VCPU_STAT(halt_wakeup),
 	VCPU_STAT(hvc_exit_stat),
 	VCPU_STAT(wfe_exit_stat),
 	VCPU_STAT(wfi_exit_stat),
diff --git a/arch/arm64/kvm/guest.c b/arch/arm64/kvm/guest.c
index dfd6264..260ea31 100644
--- a/arch/arm64/kvm/guest.c
+++ b/arch/arm64/kvm/guest.c
@@ -34,6 +34,10 @@
 #define VCPU_STAT(x) { #x, offsetof(struct kvm_vcpu, stat.x), KVM_STAT_VCPU }
 
 struct kvm_stats_debugfs_item debugfs_entries[] = {
+	VCPU_STAT(halt_successful_poll),
+	VCPU_STAT(halt_attempted_poll),
+	VCPU_STAT(halt_poll_invalid),
+	VCPU_STAT(halt_wakeup),
 	VCPU_STAT(hvc_exit_stat),
 	VCPU_STAT(wfe_exit_stat),
 	VCPU_STAT(wfi_exit_stat),
-- 
1.8.3.1

_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

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

* Re: [PATCH] KVM: arm/arm64: show halt poll counters in debugfs
  2019-10-27  8:19 [PATCH] KVM: arm/arm64: show halt poll counters in debugfs Christian Borntraeger
@ 2019-10-29 10:23 ` Marc Zyngier
  0 siblings, 0 replies; 2+ messages in thread
From: Marc Zyngier @ 2019-10-29 10:23 UTC (permalink / raw)
  To: Christian Borntraeger; +Cc: kvm, linux-kernel, kvmarm

On Sun, 27 Oct 2019 08:19:50 +0000,
Christian Borntraeger <borntraeger@de.ibm.com> wrote:

Hi Christian,

> ARM/ARM64 has counters halt_successful_poll, halt_attempted_poll,
> halt_poll_invalid, and halt_wakeup but never exposed those in debugfs.
> 
> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
> ---
> This patch is untested

Seems to do the right thing on arm64:

halt_attempted_poll:8106331
halt_poll_invalid:0
halt_successful_poll:1440219
halt_wakeup:21835894

Applied to -next.

Thanks,

	M.

-- 
Jazz is not dead, it just smells funny.
_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

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

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-27  8:19 [PATCH] KVM: arm/arm64: show halt poll counters in debugfs Christian Borntraeger
2019-10-29 10:23 ` Marc Zyngier

KVM ARM Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/kvmarm/0 kvmarm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kvmarm kvmarm/ https://lore.kernel.org/kvmarm \
		kvmarm@lists.cs.columbia.edu
	public-inbox-index kvmarm

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/edu.columbia.cs.lists.kvmarm


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git