summaryrefslogtreecommitdiff
path: root/Documentation/arm64
diff options
context:
space:
mode:
authorAndrew Murray <andrew.murray@arm.com>2019-04-09 22:22:16 +0300
committerMarc Zyngier <marc.zyngier@arm.com>2019-04-24 17:46:26 +0300
commit39e3406a090a54e700a7c0820c8258af1196b0c2 (patch)
treedfb938c6a6cd46c7572150d8b94e9b48326b8d5f /Documentation/arm64
parent435e53fb5e21ad1820c5c69f208304c0e5623d01 (diff)
downloadlinux-39e3406a090a54e700a7c0820c8258af1196b0c2.tar.xz
arm64: KVM: Avoid isb's by using direct pmxevtyper sysreg
Upon entering or exiting a guest we may modify multiple PMU counters to enable of disable EL0 filtering. We presently do this via the indirect PMXEVTYPER_EL0 system register (where the counter we modify is selected by PMSELR). With this approach it is necessary to order the writes via isb instructions such that we select the correct counter before modifying it. Let's avoid potentially expensive instruction barriers by using the direct PMEVTYPER<n>_EL0 registers instead. As the change to counter type relates only to EL0 filtering we can rely on the implicit instruction barrier which occurs when we transition from EL2 to EL1 on entering the guest. On returning to userspace we can, at the latest, rely on the implicit barrier between EL2 and EL0. We can also depend on the explicit isb in armv8pmu_select_counter to order our write against any other kernel changes by the PMU driver to the type register as a result of preemption. Signed-off-by: Andrew Murray <andrew.murray@arm.com> Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'Documentation/arm64')
0 files changed, 0 insertions, 0 deletions