]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: Fix perfctr WRMSR for running counters
authorEric Hankland <ehankland@google.com>
Mon, 27 Jan 2020 21:22:56 +0000 (13:22 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 5 Feb 2020 15:01:15 +0000 (16:01 +0100)
commitce5d3bbb75c1af90f12722b348506435b769d862
tree7dc14820cd501a5bd7f6c0b463545a8f591148e5
parentdf076ec4b95a3e54a643559ed312a2895313a9e4
KVM: x86: Fix perfctr WRMSR for running counters

Correct the logic in intel_pmu_set_msr() for fixed and general purpose
counters. This was recently changed to set pmc->counter without taking
in to account the value of pmc_read_counter() which will be incorrect if
the counter is currently running and non-zero; this changes back to the
old logic which accounted for the value of currently running counters.

Signed-off-by: Eric Hankland <ehankland@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/pmu_intel.c