aboutsummaryrefslogtreecommitdiff
path: root/scripts/bpf_helpers_doc.py
diff options
context:
space:
mode:
authorMark Rutland <[email protected]>2018-10-17 17:42:10 +0100
committerMarc Zyngier <[email protected]>2018-10-17 18:32:46 +0100
commitda5a3ce66b8bb51b0ea8a89f42aac153903f90fb (patch)
tree474db21720fe65162b016935cb55f6ec41287dbf /scripts/bpf_helpers_doc.py
parentfd2ef358282c849c193aa36dadbf4f07f7dcd29b (diff)
KVM: arm64: Fix caching of host MDCR_EL2 value
At boot time, KVM stashes the host MDCR_EL2 value, but only does this when the kernel is not running in hyp mode (i.e. is non-VHE). In these cases, the stashed value of MDCR_EL2.HPMN happens to be zero, which can lead to CONSTRAINED UNPREDICTABLE behaviour. Since we use this value to derive the MDCR_EL2 value when switching to/from a guest, after a guest have been run, the performance counters do not behave as expected. This has been observed to result in accesses via PMXEVTYPER_EL0 and PMXEVCNTR_EL0 not affecting the relevant counters, resulting in events not being counted. In these cases, only the fixed-purpose cycle counter appears to work as expected. Fix this by always stashing the host MDCR_EL2 value, regardless of VHE. Cc: Christopher Dall <[email protected]> Cc: James Morse <[email protected]> Cc: Will Deacon <[email protected]> Cc: [email protected] Fixes: 1e947bad0b63b351 ("arm64: KVM: Skip HYP setup when already running in HYP") Tested-by: Robin Murphy <[email protected]> Signed-off-by: Mark Rutland <[email protected]> Signed-off-by: Marc Zyngier <[email protected]>
Diffstat (limited to 'scripts/bpf_helpers_doc.py')
0 files changed, 0 insertions, 0 deletions