summaryrefslogtreecommitdiffstats
path: root/Documentation/arm64
diff options
context:
space:
mode:
authorAndrew Murray2019-04-09 21:22:16 +0200
committerMarc Zyngier2019-04-24 16:46:26 +0200
commit39e3406a090a54e700a7c0820c8258af1196b0c2 (patch)
treedfb938c6a6cd46c7572150d8b94e9b48326b8d5f /Documentation/arm64
parentarm64: KVM: Enable VHE support for :G/:H perf event modifiers (diff)
downloadkernel-qcow2-linux-39e3406a090a54e700a7c0820c8258af1196b0c2.tar.gz
kernel-qcow2-linux-39e3406a090a54e700a7c0820c8258af1196b0c2.tar.xz
kernel-qcow2-linux-39e3406a090a54e700a7c0820c8258af1196b0c2.zip
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