Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp875676ybl; Tue, 28 Jan 2020 14:00:58 -0800 (PST) X-Google-Smtp-Source: APXvYqx0ALvYlK1SSQoI6trxWZ8xF/wVqkuWL8O4aZ/+ZsAP1qvnCWm06NuC08I9ImzXKVpV9z/2 X-Received: by 2002:a9d:7999:: with SMTP id h25mr18137044otm.347.1580248858454; Tue, 28 Jan 2020 14:00:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580248858; cv=none; d=google.com; s=arc-20160816; b=M5F0fDXNFSuWi7lGgmXkvq7kLZU+1KxdvWaUjF3+ANPRZSTeKv4MiZx2rpUlpKdcut jsc/qlorhNzpPcOi+8TIovkmMEwSH3iDY5GcfwZdy6SczGwlOCedNXu6qfo6C0T/U4bU C55eLpz5T9b246JnUIoNXC1p3CfEOgoBQL4G/56cxZSjoqYi2qvnFpSype/BQh8tSqcR AkcnFXx19kbfBkNTXcwrFa3qyVJyyDQMdOFLO3ZjeLoK+R+f0PE0k1DU7uv2bw2PX4pw tZWFHEZ2jz7XmstjHrsQSzmTFv19SzYz4kbMutEcInPFW27Hor2qL7RMlOjqSQIZtRgX RLFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=5qE2yGDar/QO89ZtmbEwV0agYaFSTn6aRkOLzm6MdDM=; b=ZquE8m0tzF6CiQ9e1WYDjuVSTBis33ngRzlFXxoaFAISANp8nPM/bFADDofJ19vYF7 bMnauinRa2IFwtn9zxve60Gf+zhJunb6ofhFFTaYhcI/OYoe2KX+VTFlXkynBHgKH33B bId11oAwmKcSR4thTt1cCiPA5wPAYGFrNoxttHLg1AT/wc2hF159hsZvHengOQYrailT 1gq+LgOTEYEdSmq2Zl10hK5eSLiEzJ7sR5Z2IIOSGcoof5iJzw0z53oCJQrsa+a5QYHN tx7XujyC3EWyFwlaCyldDb/kopgcofYKSB9R2hBmV7CmtONndPBb8bo1Ci5sauVZHsrn sh5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=KnDzVDoX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x5si57891oic.72.2020.01.28.14.00.42; Tue, 28 Jan 2020 14:00:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=KnDzVDoX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726211AbgA1V7l (ORCPT + 99 others); Tue, 28 Jan 2020 16:59:41 -0500 Received: from mail-il1-f193.google.com ([209.85.166.193]:45381 "EHLO mail-il1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726257AbgA1V7k (ORCPT ); Tue, 28 Jan 2020 16:59:40 -0500 Received: by mail-il1-f193.google.com with SMTP id p8so12107252iln.12 for ; Tue, 28 Jan 2020 13:59:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=5qE2yGDar/QO89ZtmbEwV0agYaFSTn6aRkOLzm6MdDM=; b=KnDzVDoX/735WRiNifi2vMkpwGbkqY73NCKHH2E7ldvV16oBi22WMClKG0mBbMlGoP agf6TI3e+yFWCxKVjYsWoadqbKcJ2Y/FWp0721tdhrwJ9PXevZB1t61oMCg4H7DpShbA LYf2DFWQTfn9Em0DZZweVfszDmmnGSE6SeLYTGeQmUpFn82c+4huguBLrWvgNi6giiSt QsCoreTxs1E/HkcMHUFTcbq1npKL2NMPCY0LbbqcqTFOxJ1H2r4KUJVu0CBREgM47dcx yeMKjAg704GP99/Z2dIS5/oePgycIA2fudk8NWYJzVtRWVJAYPhFH/QKET5c1O3ZRtAJ SaLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=5qE2yGDar/QO89ZtmbEwV0agYaFSTn6aRkOLzm6MdDM=; b=Tu9uDIlQHpqztjub86O4QnLvllGGEMQf7vHv2XuVOHRVAhqPFZvAZOyV+9pmN9Dcni qIoxTYM8ZxXtwouPkxaYeTE9Dt6bQcFLdmK0u/eB+S1QvEKb/mSkw4P46M5ubMwfFpjT uiopmkatpTPZmqwtuPINHAltNHNJmbvbxAcTjn7sbGshds/u50sivYwUTTV/MTI4MfS8 uCBacfDH3rsDoJOVreD43xrI/C0ybuN42s1WMH+vjdPv/XuUcqrkBykwUWjTKfoWTNg/ 1Av7jXaNFgaqZxBtHy2DBLgDr+US09+ANFmLQPLljk1cknDGSk226TIkEjhaWAVIHGKs pjjA== X-Gm-Message-State: APjAAAVijAIcVzXVI8ajb2t38RizKFw9Y7EQ2WdyYxF8Xu47gqe+8YEQ t+yvjTmxoJ1T2htQlQ2MJubWD8GE2DKvnrNScHcwDw== X-Received: by 2002:a92:8141:: with SMTP id e62mr21629924ild.119.1580248779692; Tue, 28 Jan 2020 13:59:39 -0800 (PST) MIME-Version: 1.0 References: <20200127212256.194310-1-ehankland@google.com> In-Reply-To: <20200127212256.194310-1-ehankland@google.com> From: Jim Mattson Date: Tue, 28 Jan 2020 13:59:28 -0800 Message-ID: Subject: Re: [PATCH] KVM: x86: Fix perfctr WRMSR for running counters To: Eric Hankland Cc: Paolo Bonzini , Peter Shier , LKML , kvm list Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 27, 2020 at 1:23 PM Eric Hankland 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 Fixes: 2924b52117b2 ("KVM: x86/pmu: do not mask the value that is written to fixed PMUs") Reviewed-by: Jim Mattson