Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp725713pxb; Tue, 2 Feb 2021 16:49:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJybkwW/JGOO/ajLveWWxI+uUe6sARSXa5wJ/JIH32hbsAUq8X99WlmCiTvYSP1lRNfZNWIS X-Received: by 2002:a05:6402:95a:: with SMTP id h26mr635565edz.288.1612313344008; Tue, 02 Feb 2021 16:49:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612313344; cv=none; d=google.com; s=arc-20160816; b=vfA8PTLVkmVytFrjX3yVCEfKjpFiZm81pRg78YsNijFcJ6kD8ZAdgymxazs3Q5D7Ii euuNFPpZS/z9J13nDzuieoFY+kk6BLPRL4+Aj9Kmgo6ESZzecNeVbmsD/BkuprFGwP9r I4CZYW934W88EMQVh9Ks3fGMtax3ieFw6VF2aYRONGTWWd8W6VqUZ5oAs6ogR/jRaqj8 hVrfOl0DEZEsD6BjcUiFwxNTs6fBqUoMs5gEaI/z11TOrLcXbOIXOpxMTObxJFemuC/d 6TUwY/sZ5L98ZJEI/ivSp0BU2jEMdJpQQzOeBD7uDywlM0CHeV9phBfQ3rqs1zD/K87r hhKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=MAUih+AWOaC/bC6GpBxKYSXSms1bKybSQbGdXoov5/0=; b=mxTdH3ag1d9jIm8cGyzHHwef8NKA3l49SSZXrk2OkupoByaMU479nHA66aaSUHJuPj m0SE6bLtaKdyX+Fl1wqDr5uRXem7ihymR+8mYlkdyrl9lbD3YOL+B+/bQo3U3fZzciNL wr5d4fzXAv6uAbASNNXRb5lajvKvAruNC4Q1Fd8taR/LqZn9Zv7BLWRnv7melPfenQuU 6nQiNEIYue5SeQPGsMPy923egJ8lGzRAVcJ7NKYwNhCuxs/F/m0ijndbN/yxjTmp8hXf Z1FKUhDXJ+zc+sZLmKLEtsyZYhIC/OO5+iFoy9tjEvcTkskUdOX8peG5u6nhsIrfUtbe JH4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jFFw1heo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a8si228881edu.340.2021.02.02.16.48.40; Tue, 02 Feb 2021 16:49:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jFFw1heo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240281AbhBBT7H (ORCPT + 99 others); Tue, 2 Feb 2021 14:59:07 -0500 Received: from mail.kernel.org ([198.145.29.99]:38094 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232904AbhBBNtl (ORCPT ); Tue, 2 Feb 2021 08:49:41 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id E734164FAC; Tue, 2 Feb 2021 13:42:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1612273367; bh=0xlFXyzjFQn0ZNl9q3mk79GGtkzlO+/+60Sur7xzQrA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jFFw1heoa1/B9928nQbMMXLqaZSn7kQMf5che38julKkj7JyyfF6R4l529NR3bFuu IOkZUSWDI3drhtSek55JUgOsCCDn8VFsEg2L2216p9Kf0fYAvAx+JrnaTfj4XU5ckc IZKWfFZzvviCosQ8nwiB2f0msC8270ZQSigdxmjQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Like Xu , Sean Christopherson , Paolo Bonzini Subject: [PATCH 5.10 039/142] KVM: x86/pmu: Fix HW_REF_CPU_CYCLES event pseudo-encoding in intel_arch_events[] Date: Tue, 2 Feb 2021 14:36:42 +0100 Message-Id: <20210202132959.325597474@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210202132957.692094111@linuxfoundation.org> References: <20210202132957.692094111@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Like Xu commit 98dd2f108e448988d91e296173e773b06fb978b8 upstream. The HW_REF_CPU_CYCLES event on the fixed counter 2 is pseudo-encoded as 0x0300 in the intel_perfmon_event_map[]. Correct its usage. Fixes: 62079d8a4312 ("KVM: PMU: add proper support for fixed counter 2") Signed-off-by: Like Xu Message-Id: <20201230081916.63417-1-like.xu@linux.intel.com> Reviewed-by: Sean Christopherson Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini Signed-off-by: Greg Kroah-Hartman --- arch/x86/kvm/vmx/pmu_intel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/x86/kvm/vmx/pmu_intel.c +++ b/arch/x86/kvm/vmx/pmu_intel.c @@ -29,7 +29,7 @@ static struct kvm_event_hw_type_mapping [4] = { 0x2e, 0x41, PERF_COUNT_HW_CACHE_MISSES }, [5] = { 0xc4, 0x00, PERF_COUNT_HW_BRANCH_INSTRUCTIONS }, [6] = { 0xc5, 0x00, PERF_COUNT_HW_BRANCH_MISSES }, - [7] = { 0x00, 0x30, PERF_COUNT_HW_REF_CPU_CYCLES }, + [7] = { 0x00, 0x03, PERF_COUNT_HW_REF_CPU_CYCLES }, }; /* mapping between fixed pmc index and intel_arch_events array */