From: Reiji Watanabe <reijiw@google.com>
To: Marc Zyngier <maz@kernel.org>,
Oliver Upton <oliver.upton@linux.dev>,
kvmarm@lists.linux.dev
Cc: kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
James Morse <james.morse@arm.com>,
Alexandru Elisei <alexandru.elisei@arm.com>,
Zenghui Yu <yuzenghui@huawei.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Jing Zhang <jingzhangos@google.com>,
Raghavendra Rao Anata <rananta@google.com>,
Reiji Watanabe <reijiw@google.com>
Subject: [PATCH 0/2] KVM: arm64: PMU: Disallow vPMU on non-uniform PMUVer systems
Date: Fri, 9 Jun 2023 23:15:18 -0700 [thread overview]
Message-ID: <20230610061520.3026530-1-reijiw@google.com> (raw)
On systems where the PMUVer is not uniform across all PEs,
KVM currently does not advertise PMUv3 to the guests,
even if userspace successfully runs KVM_ARM_VCPU_INIT with
KVM_ARM_VCPU_PMU_V3.
In such systems, KVM should either disallow userspace from
configuring vPMU, or advertise PMUv3 to the guest.
This series addresses this inconsistent behavior by implementing
the former, as such systems would be extremely uncommon and
unlikely to even use KVM (according to Marc [1]).
The series is based on v6.4-rc5.
[1] https://lore.kernel.org/all/874jnqp73o.wl-maz@kernel.org/
Reiji Watanabe (2):
KVM: arm64: PMU: Introduce pmu_v3_is_supported() helper
KVM: arm64: PMU: Disallow vPMU on non-uniform PMUVer systems
arch/arm64/kvm/arm.c | 1 +
arch/arm64/kvm/pmu-emul.c | 6 +-----
arch/arm64/kvm/sys_regs.c | 2 +-
include/kvm/arm_pmu.h | 18 ++++++++++++++++++
4 files changed, 21 insertions(+), 6 deletions(-)
base-commit: 9561de3a55bed6bdd44a12820ba81ec416e705a7
--
2.41.0.162.gfafddb0af9-goog
next reply other threads:[~2023-06-10 6:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-10 6:15 Reiji Watanabe [this message]
2023-06-10 6:15 ` [PATCH 1/2] KVM: arm64: PMU: Introduce pmu_v3_is_supported() helper Reiji Watanabe
2023-06-11 1:10 ` Oliver Upton
2023-06-10 6:15 ` [PATCH 2/2] KVM: arm64: PMU: Disallow vPMU on non-uniform PMUVer systems Reiji Watanabe
2023-06-11 2:32 ` Oliver Upton
2023-06-11 5:03 ` Reiji Watanabe
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=20230610061520.3026530-1-reijiw@google.com \
--to=reijiw@google.com \
--cc=alexandru.elisei@arm.com \
--cc=james.morse@arm.com \
--cc=jingzhangos@google.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=maz@kernel.org \
--cc=oliver.upton@linux.dev \
--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