From: Oliver Upton <oliver.upton@linux.dev>
To: kvmarm@lists.linux.dev
Cc: kvm@vger.kernel.org, Marc Zyngier <maz@kernel.org>,
James Morse <james.morse@arm.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Zenghui Yu <yuzenghui@huawei.com>,
Oliver Upton <oliver.upton@linux.dev>
Subject: [PATCH v3 0/2] KVM: arm64: PMU event filtering fixes
Date: Thu, 19 Oct 2023 18:56:16 +0000 [thread overview]
Message-ID: <20231019185618.3442949-1-oliver.upton@linux.dev> (raw)
PMU event exception level filtering fixes
Fixes to KVM's handling of the PMUv3 exception level filtering bits:
- NSH (count at EL2) and M (count at EL3) should be stateful when the
respective EL is advertised in the ID registers but have no effect on
event counting.
- NSU and NSK modify the event filtering of EL0 and EL1, respectively.
Though the kernel may not use these bits, other KVM guests might.
Implement these bits exactly as written in the pseudocode if EL3 is
advertised.
v2: https://lore.kernel.org/kvmarm/20231013052901.170138-1-oliver.upton@linux.dev/
v2 -> v3:
- Make the bits conditional on the ID register values
- Allow the guest to set the M and NSH bits without effect (Marc)
Oliver Upton (2):
KVM: arm64: Make PMEVTYPER<n>_EL0.NSH RES0 if EL2 isn't advertised
KVM: arm64: Add PMU event filter bits required if EL3 is implemented
arch/arm64/kvm/pmu-emul.c | 36 +++++++++++++++++++++++++---------
arch/arm64/kvm/sys_regs.c | 8 ++++++--
include/kvm/arm_pmu.h | 5 +++++
include/linux/perf/arm_pmuv3.h | 9 ++++++---
4 files changed, 44 insertions(+), 14 deletions(-)
base-commit: 6465e260f48790807eef06b583b38ca9789b6072
--
2.42.0.655.g421f12c284-goog
next reply other threads:[~2023-10-19 18:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-19 18:56 Oliver Upton [this message]
2023-10-19 18:56 ` [PATCH v3 1/2] KVM: arm64: Make PMEVTYPER<n>_EL0.NSH RES0 if EL2 isn't advertised Oliver Upton
2023-10-24 2:47 ` kernel test robot
2023-10-24 18:58 ` Oliver Upton
2023-10-19 18:56 ` [PATCH v3 2/2] KVM: arm64: Add PMU event filter bits required if EL3 is implemented Oliver Upton
2023-10-24 19:33 ` [PATCH v3 0/2] KVM: arm64: PMU event filtering fixes 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=20231019185618.3442949-1-oliver.upton@linux.dev \
--to=oliver.upton@linux.dev \
--cc=james.morse@arm.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.linux.dev \
--cc=maz@kernel.org \
--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