summaryrefslogtreecommitdiff
path: root/include/linux/root_dev.h
diff options
context:
space:
mode:
authorQiang Ma <maqianga@uniontech.com>2026-05-26 15:46:40 +0800
committerMarc Zyngier <maz@kernel.org>2026-05-27 10:15:40 +0100
commit1750ad1388e03fb27068cd1f22c9c8b4590fe936 (patch)
treeef0506a98caf1d7ecf842a3311cd3cbed1065275 /include/linux/root_dev.h
parent373452ac0649846431ca0f88574a2fa6382d2045 (diff)
KVM: arm64: PMU: Preserve AArch32 counter low bits
AArch32 writes to PMU event counters cannot update the top 32 bits, even when PMUv3p5 makes the counters 64-bit. KVM therefore needs to preserve the existing high half and only update the low half written by the guest, unless the caller explicitly forces a full reset through PMCR.P. The current code masks @val down to the old high half before taking lower_32_bits(val), which means the low half is always zero. As a result, AArch32 writes to event counters discard the guest-provided low 32 bits instead of storing them. Build the new value from the old high 32 bits and the low 32 bits of the value supplied by the guest. Fixes: 26d2d0594d70 ("KVM: arm64: PMU: Do not let AArch32 change the counters' top 32 bits") Signed-off-by: Qiang Ma <maqianga@uniontech.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://patch.msgid.link/20260526074640.791991-1-maqianga@uniontech.com Cc: stable@vger.kernel.org
Diffstat (limited to 'include/linux/root_dev.h')
0 files changed, 0 insertions, 0 deletions