From patchwork Mon Dec 12 10:35:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luwei Kang X-Patchwork-Id: 9470375 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6289E60476 for ; Mon, 12 Dec 2016 10:39:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 51D3D28478 for ; Mon, 12 Dec 2016 10:39:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4672E2847C; Mon, 12 Dec 2016 10:39:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D2EDD28478 for ; Mon, 12 Dec 2016 10:39:16 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cGNyj-0001KO-Ue; Mon, 12 Dec 2016 10:37:05 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cGNyi-0001KE-8y for xen-devel@lists.xen.org; Mon, 12 Dec 2016 10:37:04 +0000 Received: from [85.158.139.211] by server-15.bemta-5.messagelabs.com id 14/4F-13537-FCD7E485; Mon, 12 Dec 2016 10:37:03 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrELMWRWlGSWpSXmKPExsXS1tbhqHum1i/ CYNl7RoslHxezODB6HN39mymAMYo1My8pvyKBNWPi6n2MBWfYKq7M3MXSwLiDtYuRk0NIoFJi x7RXLCC2hACvxJFlM1ghbD+Jxl0LmSFqqiSmT9nFBmKzCahLbH2/EaxGREBa4trny4xdjFwcz AKtjBKXOhuYQBLCAmESHZfegRWxCKhKvPl/BszmFXCReHJ/IhPEAjmJm+c6mScwci9gZFjFqF GcWlSWWqRraKiXVJSZnlGSm5iZo2toYKqXm1pcnJiempOYVKyXnJ+7iRHoXwYg2MG4st35EKM kB5OSKO8Pb78IIb6k/JTKjMTijPii0pzU4kOMMhwcShK8zTVAOcGi1PTUirTMHGCgwaQlOHiU RHi/gKR5iwsSc4sz0yFSpxh1OQ68X/GUSYglLz8vVUqc9wBIkQBIUUZpHtwIWNBfYpSVEuZlB DpKiKcgtSg3swRV/hWjOAejkjBvLMgUnsy8ErhNr4COYAI64vk+b5AjShIRUlINjOHT2X/NT2 Mq/rIkuPGC8eOKzDf9HKax2yLKjx7f+qdRflFi+weWTWnzI158ZbzUI+GSMSeCpa/bSZfnn6P glhL+nUJ5b44xqKfqvEp58HvKsgtWn3elerQ3Jb2a1ca4vLa1Io5v07HoaabnON5N3qTsFf9W 85xp69WtIgVf9B37sz/OnxK+VYmlOCPRUIu5qDgRAIUR9nx1AgAA X-Env-Sender: luwei.kang@intel.com X-Msg-Ref: server-6.tower-206.messagelabs.com!1481539016!74734880!1 X-Originating-IP: [134.134.136.65] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.1.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 4830 invoked from network); 12 Dec 2016 10:36:58 -0000 Received: from mga03.intel.com (HELO mga03.intel.com) (134.134.136.65) by server-6.tower-206.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 12 Dec 2016 10:36:58 -0000 Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP; 12 Dec 2016 02:36:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,335,1477983600"; d="scan'208";a="41520697" Received: from vmm-dell.bj.intel.com ([10.238.154.151]) by fmsmga005.fm.intel.com with ESMTP; 12 Dec 2016 02:36:54 -0800 From: Luwei Kang To: xen-devel@lists.xen.org Date: Mon, 12 Dec 2016 18:35:58 +0800 Message-Id: <1481538958-13588-1-git-send-email-luwei.kang@intel.com> X-Mailer: git-send-email 2.7.4 Cc: andrew.cooper3@citrix.com, kevin.tian@intel.com, Luwei Kang , jun.nakajima@intel.com, jbeulich@suse.com Subject: [Xen-devel] [PATCH] X86/VPMU:clear the overflow status of which counter happened overflow X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP If a counter happend overflow just clear corresponding bit of IA32_PERF_GLOBAL_OVF_CTRL, rather than clear all the bit of this msr. Signed-off-by: Luwei Kang --- xen/arch/x86/cpu/vpmu_intel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/cpu/vpmu_intel.c b/xen/arch/x86/cpu/vpmu_intel.c index e8049ed..613aafe 100644 --- a/xen/arch/x86/cpu/vpmu_intel.c +++ b/xen/arch/x86/cpu/vpmu_intel.c @@ -868,7 +868,7 @@ static int core2_vpmu_do_interrupt(struct cpu_user_regs *regs) if ( is_pmc_quirk ) handle_pmc_quirk(msr_content); core2_vpmu_cxt->global_status |= msr_content; - msr_content = ~global_ovf_ctrl_mask; + msr_content &= ~global_ovf_ctrl_mask; wrmsrl(MSR_CORE_PERF_GLOBAL_OVF_CTRL, msr_content); } else