Re: [PATCH] KVM: x86: Fix perfctr WRMSR for running counters

From: Jim Mattson
Date: Tue Jan 28 2020 - 16:59:45 EST


On Mon, Jan 27, 2020 at 1:23 PM Eric Hankland <ehankland@xxxxxxxxxx> wrote:
>
> 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@xxxxxxxxxx>

Fixes: 2924b52117b2 ("KVM: x86/pmu: do not mask the value that is
written to fixed PMUs")

Reviewed-by: Jim Mattson <jmattson@xxxxxxxxxx>