]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: Gate kvm_pmu_update_state() on the PMU feature
authorMarc Zyngier <maz@kernel.org>
Fri, 13 Nov 2020 16:41:40 +0000 (16:41 +0000)
committerMarc Zyngier <maz@kernel.org>
Fri, 27 Nov 2020 11:41:12 +0000 (11:41 +0000)
commitb8089209dcfd2376cd35fdc83d9145c90c30b115
tree226ef219b2f14dfa2766639e6e08b400d4bfe211
parent36e6717626048b500ac9227c4b1a30897a236b32
KVM: arm64: Gate kvm_pmu_update_state() on the PMU feature

We currently gate the update of the PMU state on the PMU being "ready".
The "ready" state is only set to true when the first vcpu run is
successful, and if it isn't, we never reach the update code.

So the "ready" state is never the right thing to check for, and it
should instead be the presence of the PMU feature, which makes
a bit more sense.

Reviewed-by: Alexandru Elisei <alexandru.elisei@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/pmu-emul.c