Skip to content
Commit ebff0b0e authored by Marc Zyngier's avatar Marc Zyngier
Browse files

KVM: arm64: Reset the PMU in preemptible context

We've become very cautious to now always reset the vcpu when nothing
is loaded on the physical CPU. To do so, we now disable preemption
and do a kvm_arch_vcpu_put() to make sure we have all the state
in memory (and that it won't be loaded behind out back).

This now causes issues with resetting the PMU, which calls into perf.
Perf itself uses mutexes, which clashes with the lack of preemption.
It is worth realizing that the PMU is fully emulated, and that
no PMU state is ever loaded on the physical CPU. This means we can
perfectly reset the PMU outside of the non-preemptible section.

Fixes: e761a927

 ("KVM: arm/arm64: Reset the VCPU without preemption and vcpu state loaded")
Reported-by: default avatarJulien Grall <julien.grall@arm.com>
Tested-by: default avatarJulien Grall <julien.grall@arm.com>
Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
parent 9e98c678
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment