Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp208582pxb; Fri, 15 Jan 2021 00:50:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJwridcXWXDEcQahY7lFNaGV0hy7F/yZXjL2Qia6I5i+VsGVtafnhOQOxXt4Xozytxl9qr8W X-Received: by 2002:a17:906:ae41:: with SMTP id lf1mr8181029ejb.369.1610700656090; Fri, 15 Jan 2021 00:50:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610700656; cv=none; d=google.com; s=arc-20160816; b=TQsZI4qUa+0NLSFZaG9nMqORMPM3qrywZ4eFMTjuGJwtfQHIrZHN1nq4MqVq/pIHmt IRYOvLA74qGNdA5Qvxcg0sfHkD0bUTGyI40giGKPLc6C1Z0yUM6uCPDDar4fex1A17/r AYBSxvAHNlZRdRdCk3gHngKGiMzD5UKvS40TUBYuj0P1fkcbZUGOK174cdbWdnW6NzrH njAr8HCc+2w9BP0KMimvZqCKeP44i4sqDCjLCujKknBCBr7gj29V7N81CvfrXIJIgKEq kBaTcAaX1acHJLNVMF1WSJWzLVvXcXCll8sT1Az28+/7LdfRrXSWyb1ByPbksa5Teb5q gaRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:organization :references:cc:to:from:subject:ironport-sdr:ironport-sdr; bh=p5RGU1XgHKNojWIPp+4OLFwAydNUVIxHe2yLgDh6hmY=; b=gQCqllpQzqv9XpbuzhA6QLJvnggIn6eaDiiwFa1IVe2dyX+Y8WQLYsFOkHgEPeXYu8 /jC/aX+3jsHPAUcEcHSA+sf3XZNWV1Mp+9Sx/m/oGYUUknVvD5LcSHZqSY/cH5PZcgil 0seo1/DWegazmbi9zIyPLEOnN4Rp50sBmUqNKfE/UYqbxe3z+K1PvduV21Q3H3DOWqrI aHKwXEUKeEzAB0HZNi8UM+jd55qRsfE6FFlsLZ0e+wXgnmAiT2NHF/0rIo/XEapf15+O ttPdEx/EBkBP8RR1V6i3cELrpDwW2F2chEEqUJ2Hc0K6gpo9moaLTqL9NsLu96wASVwK J1pQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qx4si2682446ejb.547.2021.01.15.00.50.32; Fri, 15 Jan 2021 00:50:56 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727554AbhAOIsy (ORCPT + 99 others); Fri, 15 Jan 2021 03:48:54 -0500 Received: from mga09.intel.com ([134.134.136.24]:55382 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725950AbhAOIsx (ORCPT ); Fri, 15 Jan 2021 03:48:53 -0500 IronPort-SDR: thnlNs/BUGLW2zWmzEotKQwhtFiK1mxvoaRvdtTTAqGaFSkY+PTKKQYzl1og4MH9jBJSjcuCdv UJ6y5JfHcLeA== X-IronPort-AV: E=McAfee;i="6000,8403,9864"; a="178669450" X-IronPort-AV: E=Sophos;i="5.79,349,1602572400"; d="scan'208";a="178669450" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jan 2021 00:47:04 -0800 IronPort-SDR: SdOdKSFHHg3PsRBqDfAzO4qO7AQvuyr+ujeq23zbjofLXPQY7BG4cCkwDVcRojxTTlLR7Pks5S eOM6YisK+Svg== X-IronPort-AV: E=Sophos;i="5.79,349,1602572400"; d="scan'208";a="382590183" Received: from likexu-mobl1.ccr.corp.intel.com (HELO [10.238.4.93]) ([10.238.4.93]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jan 2021 00:46:59 -0800 Subject: Re: [PATCH] KVM: x86/pmu: Fix HW_REF_CPU_CYCLES event pseudo-encoding in intel_arch_events[] From: Like Xu To: Paolo Bonzini , Stephane Eranian , Sean Christopherson Cc: Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20201230081916.63417-1-like.xu@linux.intel.com> Organization: Intel OTC Message-ID: <1ff5381c-3057-7ca2-6f62-bbdcefd8e427@linux.intel.com> Date: Fri, 15 Jan 2021 16:46:55 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: <20201230081916.63417-1-like.xu@linux.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Ping ? On 2020/12/30 16:19, Like Xu wrote: > 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 > --- > arch/x86/kvm/vmx/pmu_intel.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/x86/kvm/vmx/pmu_intel.c b/arch/x86/kvm/vmx/pmu_intel.c > index a886a47daebd..013e8d253dfa 100644 > --- 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 intel_arch_events[] = { > [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 */