aboutsummaryrefslogtreecommitdiffstats
path: root/rust/helpers/task.c
diff options
context:
space:
mode:
authorMarc Zyngier <[email protected]>2025-02-17 10:24:43 +0000
committerMarc Zyngier <[email protected]>2025-04-11 11:59:10 +0000
commit022435334393d56f4d6bc398cf16430067807b0a (patch)
tree5024fda3788909e90a8cd78596198f8a9130ae3b /rust/helpers/task.c
parentKVM: arm64: Fix MDCR_EL2.HPMN reset value (diff)
downloadkernel-022435334393d56f4d6bc398cf16430067807b0a.tar.gz
kernel-022435334393d56f4d6bc398cf16430067807b0a.zip
KVM: arm64: Contextualise the handling of PMCR_EL0.P writes
Contrary to what the comment says in kvm_pmu_handle_pmcr(), writing PMCR_EL0.P==1 has the following effects: <quote> The event counters affected by this field are: * All event counters in the first range. * If any of the following are true, all event counters in the second range: - EL2 is disabled or not implemented in the current Security state. - The PE is executing at EL2 or EL3. </quote> where the "first range" represent the counters in the [0..HPMN-1] range, and the "second range" the counters in the [HPMN..MAX] range. It so appears that writing P from EL2 should nuke all counters, and not just the "guest" view. Just do that, and nuke the misleading comment. Reported-by: Joey Gouly <[email protected]> Reviewed-by: Oliver Upton <[email protected]> Signed-off-by: Marc Zyngier <[email protected]>
Diffstat (limited to 'rust/helpers/task.c')
0 files changed, 0 insertions, 0 deletions