linux/Documentation/virt/kvm
Marc Zyngier 5177fe91e4 KVM: arm64: Do not change the PMU event filter after a VCPU has run
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
2022-02-08 17:51:21 +00:00
..
arm KVM: arm64: Fix Function ID typo for PTP_KVM service 2021-04-20 17:19:08 +01:00
devices KVM: arm64: Do not change the PMU event filter after a VCPU has run 2022-02-08 17:51:21 +00:00
amd-memory-encryption.rst crypto: ccp - Add SEV_INIT_EX support 2021-12-17 16:59:47 +11:00
api.rst KVM: x86: add system attribute to retrieve full set of supported xsave states 2022-01-28 07:33:32 -05:00
cpuid.rst KVM: X86: Introduce KVM_HC_MAP_GPA_RANGE hypercall 2021-06-17 14:25:39 -04:00
halt-polling.rst docs: virt: convert halt-polling.txt to ReST format 2020-02-12 20:09:50 +01:00
hypercalls.rst KVM: X86: Introduce KVM_HC_MAP_GPA_RANGE hypercall 2021-06-17 14:25:39 -04:00
index.rst docs/virt/kvm: Document configuring and running nested guests 2020-05-06 05:45:47 -04:00
locking.rst Merge branch 'kvm-tdpmmu-fixes' into HEAD 2021-08-13 03:35:01 -04:00
mmu.rst KVM: X86: Rename gpte_is_8_bytes to has_4_byte_gpte and invert the direction 2021-12-08 04:25:13 -05:00
msr.rst KVM: X86: Introduce KVM_HC_MAP_GPA_RANGE hypercall 2021-06-17 14:25:39 -04:00
nested-vmx.rst KVM: Documentation: Fix documentation for nested. 2021-01-28 13:03:14 -05:00
ppc-pv.rst docs: kvm: Convert ppc-pv.txt to ReST format 2020-02-12 20:10:05 +01:00
review-checklist.rst docs: fix broken references for ReST files that moved around 2020-04-20 15:45:03 -06:00
running-nested-guests.rst KVM: Documentation: Fix documentation for nested. 2021-01-28 13:03:14 -05:00
s390-diag.rst KVM: s390: diag9c (directed yield) forwarding 2021-03-09 10:16:26 +01:00
s390-pv-boot.rst docs: virt: kvm: s390-pv-boot.rst: avoid using ReST :doc:foo markup 2021-06-17 13:24:39 -06:00
s390-pv.rst Documentation: virt: kvm/s390-pv: drop doubled words 2020-07-05 14:42:17 -06:00
timekeeping.rst docs: kvm: Convert timekeeping.txt to ReST format 2020-02-12 20:10:06 +01:00
vcpu-requests.rst This was a reasonably active cycle for documentation; this pull includes: 2021-06-28 16:53:05 -07:00