Linux KVM/arm64 development list
 help / color / mirror / Atom feed
From: Oliver Upton <oliver.upton@linux.dev>
To: kvmarm@lists.linux.dev
Cc: Marc Zyngier <maz@kernel.org>, Joey Gouly <joey.gouly@arm.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Zenghui Yu <yuzenghui@huawei.com>,
	Mingwei Zhang <mizhang@google.com>,
	Colton Lewis <coltonlewis@google.com>,
	Raghavendra Rao Ananta <rananta@google.com>,
	James Clark <james.clark@linaro.org>,
	Oliver Upton <oliver.upton@linux.dev>
Subject: [PATCH 0/4] KVM: arm64: PMU fixes for 6.13
Date: Tue, 17 Dec 2024 09:53:32 -0800	[thread overview]
Message-ID: <20241217175336.3657966-1-oliver.upton@linux.dev> (raw)

Small set of fixes for PMU, mostly focused on plugging gaps in nested
support that I'd missed last time around:

 - Don't attempt to enable/disable EL2 counters when PMCR_EL0.E is
   changed. This is already the case since the enable state of a
   counter is re-evaluated in kvm_pmu_create_perf_event(), though the
   handling of PMCR_EL0.E would suggest otherwise.

 - Enable/disable EL2 counters when MDCR_EL2.HPME is changed.

 - Only reset 'guest' counters when PMCR_EL0.P is set, excluding EL2
   counters from being reset.

Applies to 6.13-rc3, tested on the M2 w/ my PMUv3 patches thrown on top.

Oliver Upton (4):
  KVM: arm64: Add unified helper for reprogramming counters by mask
  KVM: arm64: Use KVM_REQ_RELOAD_PMU to handle PMCR_EL0.E change
  KVM: arm64: nv: Reload PMU events upon MDCR_EL2.HPME change
  KVM: arm64: Only apply PMCR_EL0.P to the guest range of counters

 arch/arm64/kvm/pmu-emul.c | 89 +++++++++++++++------------------------
 arch/arm64/kvm/sys_regs.c | 32 +++++++++++---
 include/kvm/arm_pmu.h     |  6 +--
 3 files changed, 62 insertions(+), 65 deletions(-)


base-commit: 78d4f34e2115b517bcbfe7ec0d018bbbb6f9b0b8
-- 
2.39.5


             reply	other threads:[~2024-12-17 17:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-17 17:53 Oliver Upton [this message]
2024-12-17 17:55 ` [PATCH 1/4] KVM: arm64: Add unified helper for reprogramming counters by mask Oliver Upton
2024-12-17 17:55 ` [PATCH 2/4] KVM: arm64: Use KVM_REQ_RELOAD_PMU to handle PMCR_EL0.E change Oliver Upton
2024-12-17 17:55 ` [PATCH 3/4] KVM: arm64: nv: Reload PMU events upon MDCR_EL2.HPME change Oliver Upton
2024-12-17 17:56 ` [PATCH 4/4] KVM: arm64: Only apply PMCR_EL0.P to the guest range of counters Oliver Upton
2024-12-18 16:57 ` [PATCH 0/4] KVM: arm64: PMU fixes for 6.13 Marc Zyngier
2024-12-18 21:30 ` Oliver Upton

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=20241217175336.3657966-1-oliver.upton@linux.dev \
    --to=oliver.upton@linux.dev \
    --cc=coltonlewis@google.com \
    --cc=james.clark@linaro.org \
    --cc=joey.gouly@arm.com \
    --cc=kvmarm@lists.linux.dev \
    --cc=maz@kernel.org \
    --cc=mizhang@google.com \
    --cc=rananta@google.com \
    --cc=suzuki.poulose@arm.com \
    --cc=yuzenghui@huawei.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