Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp253729pxb; Fri, 15 Jan 2021 12:09:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJx4O4y8SuDTTOk2SJCHn3pGQC+VPKa9rGw2JE+zHw9TSD/6ykSKYlseE6WUMZzVLPn/Bo94 X-Received: by 2002:a17:906:c40e:: with SMTP id u14mr9881779ejz.547.1610741353660; Fri, 15 Jan 2021 12:09:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610741353; cv=none; d=google.com; s=arc-20160816; b=Xrywu7P+SjCuk9S1xb4lEbt08DAclb8LABblyWawMq9jL4ypfjN0vAN3esPnntu/W1 wTiS41bo99OQdbOB1WaWllfyKUl4SFdxXu4AA0CsnXg7lFxQGIJ3dzRB4fIk4eYPMoE7 LNJnfvIUTttuyFPBRHgcEBdTzGtaICF1PhdrvA/n1495RHDKyQ1c78do+HXB9KXxaU/o pSRiLQWvwVdkwvZd1VD45iHu/fO7td4Nj6a1PNtsetrW8c0uLY3nsQODyGfDM4zmYXQo 0s6wplDswKaPWoKxAGjEuMUgQW8SAInSZYuxFfUmmLKR5bXy0PrvSJvs7ZBt0tH/bw+x BGEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=jR4Z0QZqbVTnC1VKL7VW3Y7xnFPeU+uPaP6sUltjm/k=; b=bqU8DOQ6VznUa6SSS2srRWeav/mejr4ihU10IZMI0cDTZTEAiT5w6lR8/E7TPIAgee V8R1ACfwMoC2hNHQxIo+JJKTjHVdAHzcpUw44O5LwQnoUAH69kplKhuQX01CGT5xh2BH 7cVmbMQDthw4O+iKm7j5DQBSzJAbLZTnQnp2h4Z46jRyfIwYsyWFMrH+XD30T/1/ROZa 05KcR3WJ2j0q5mJ0T1e4F9x3ya/Ej257mKfLqapGzOD4i1vvgB+FwDhBh47HzJWqn/2t BWkXRa0eHXkzz91VVW7OM+VV2qhiMKkK8EZYUQLOuL2ncUZ9GEaQvDkibKqPwvW1rn32 rcmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=n8ZvYLAi; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dg6si1656313edb.485.2021.01.15.12.08.49; Fri, 15 Jan 2021 12:09:13 -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=@infradead.org header.s=casper.20170209 header.b=n8ZvYLAi; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733221AbhAOUFl (ORCPT + 99 others); Fri, 15 Jan 2021 15:05:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726970AbhAOUFk (ORCPT ); Fri, 15 Jan 2021 15:05:40 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3DE6EC0613C1 for ; Fri, 15 Jan 2021 12:05:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=jR4Z0QZqbVTnC1VKL7VW3Y7xnFPeU+uPaP6sUltjm/k=; b=n8ZvYLAiYTwTHlyt3/Ub7Lp4fm G275ZZoPGb8iAWKbYAWhcdVN34r0/w1mqRUE/guLT2UYYjuTW8vpYAjEaU/v15NWQ1k+TP/YHZ9du Ta4GFtQJD1s5I1Ht606ZRzKqj+n8VV5RpCJiwsoUNT2EwcfIdeojenJSLjx9oasIoXL7cV/pF94Wn Gol1k/amP0bOUYLHYiITG37Q0zKUv2+wVeYX7OgR+1RM2ulGZ89Bgxxr9rzrwC60Re5EvYdYW+jq9 JOzrKpDAyyvJnaW3XS0p0oZKXKwOVCQjGrxWts4B3ervNx6BhkkLcyz0u2UT1vnCA6Y/fP0k5eZeK 1QFZGZ9w==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1l0VJf-009Njo-FL; Fri, 15 Jan 2021 20:03:38 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id AE2BF305CC3; Fri, 15 Jan 2021 21:03:24 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 796C020291083; Fri, 15 Jan 2021 21:03:24 +0100 (CET) Date: Fri, 15 Jan 2021 21:03:24 +0100 From: Peter Zijlstra To: Zhang Rui Cc: mingo@redhat.com, acme@kernel.org, mark.rutland@arm.com, alexander.shishkin@linux.intel.com, jolsa@redhat.com, namhyung@kernel.org, linux-kernel@vger.kernel.org, x86@kernel.org, kan.liang@linux.intel.com, ak@linux.intel.com Subject: Re: [PATCH 2/3] perf/x86/rapl: Fix energy counter detection Message-ID: References: <20210115092208.20866-1-rui.zhang@intel.com> <20210115092208.20866-2-rui.zhang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210115092208.20866-2-rui.zhang@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 15, 2021 at 05:22:07PM +0800, Zhang Rui wrote: > In the RAPL ENERGY_COUNTER MSR, only the lower 32bits represent the > energy counter, and the higher 32bits are reserved. > > Add the MSR mask for these MSRs to fix a problem that the RAPL PMU events > are added erroneously when higher 32bits contain non-zero value. Why would these high bits be non-zero?