diff options
| author | Mukesh Ojha <mukesh.ojha@oss.qualcomm.com> | 2025-10-10 23:17:07 +0530 |
|---|---|---|
| committer | Marc Zyngier <maz@kernel.org> | 2025-10-13 14:26:36 +0100 |
| commit | c35dd838666d47de2848639234ec32e3ba22b49f (patch) | |
| tree | 7ecf9dd6e69394a2efa75b72cbc2dfd5bc358af9 /tools/docs/parse-headers.py | |
| parent | 9a7f87eb587da49993f47f44c4c5535d8de76750 (diff) | |
KVM: arm64: Guard PMSCR_EL1 initialization with SPE presence check
Commit efad60e46057 ("KVM: arm64: Initialize PMSCR_EL1 when in VHE")
does not perform sufficient check before initializing PMSCR_EL1 to 0
when running in VHE mode. On some platforms, this causes the system to
hang during boot, as EL3 has not delegated access to the Profiling
Buffer to the Non-secure world, nor does it reinject an UNDEF on sysreg
trap.
To avoid this issue, restrict the PMSCR_EL1 initialization to CPUs that
support Statistical Profiling Extension (FEAT_SPE) and have the
Profiling Buffer accessible in Non-secure EL1. This is determined via a
new helper `cpu_has_spe()` which checks both PMSVer and PMBIDR_EL1.P.
This ensures the initialization only affects CPUs where SPE is
implemented and usable, preventing boot failures on platforms where SPE
is not properly configured.
Fixes: efad60e46057 ("KVM: arm64: Initialize PMSCR_EL1 when in VHE")
Signed-off-by: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Diffstat (limited to 'tools/docs/parse-headers.py')
0 files changed, 0 insertions, 0 deletions
