linux-stable/Documentation/virt
Marc Zyngier 29ca4fac7d KVM: arm64: Do not change the PMU event filter after a VCPU has run
[ Upstream commit 5177fe91e4 ]

Userspace can specify which events a guest is allowed to use with the
KVM_ARM_VCPU_PMU_V3_FILTER attribute. The list of allowed events can be
identified by a guest from reading the PMCEID{0,1}_EL0 registers.

Changing the PMU event filter after a VCPU has run can cause reads of the
registers performed before the filter is changed to return different values
than reads performed with the new event filter in place. The architecture
defines the two registers as read-only, and this behaviour contradicts
that.

Keep track when the first VCPU has run and deny changes to the PMU event
filter to prevent this from happening.

Signed-off-by: Marc Zyngier <maz@kernel.org>
[ Alexandru E: Added commit message, updated ioctl documentation ]
Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220127161759.53553-2-alexandru.elisei@arm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-04-13 19:27:13 +02:00
..
acrn docs: acrn: Introduce ACRN 2021-02-09 10:58:18 +01:00
kvm KVM: arm64: Do not change the PMU event filter after a VCPU has run 2022-04-13 19:27:13 +02:00
uml docs: UML: user_mode_linux_howto_v2 edits 2021-10-12 14:07:35 -06:00
guest-halt-polling.rst docs: virt: guest-halt-polling.txt convert to ReST 2020-02-12 20:10:08 +01:00
index.rst docs: acrn: Introduce ACRN 2021-02-09 10:58:18 +01:00
ne_overview.rst nitro_enclaves: Update documentation for Arm64 support 2021-09-14 11:11:20 +02:00
paravirt_ops.rst