From patchwork Tue Oct 24 23:30:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boris Ostrovsky X-Patchwork-Id: 10025517 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 368DE601E8 for ; Tue, 24 Oct 2017 23:30:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1EFFB28A9D for ; Tue, 24 Oct 2017 23:30:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1141328AA1; Tue, 24 Oct 2017 23:30:05 +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, UNPARSEABLE_RELAY 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 92B3A28A9D for ; Tue, 24 Oct 2017 23:30:04 +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 1e78af-0006IU-AG; Tue, 24 Oct 2017 23:26:33 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e78ae-0006IO-9J for xen-devel@lists.xen.org; Tue, 24 Oct 2017 23:26:32 +0000 Received: from [85.158.143.35] by server-10.bemta-6.messagelabs.com id 53/23-07499-72CCFE95; Tue, 24 Oct 2017 23:26:31 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrKLMWRWlGSWpSXmKPExsUyZ7p8oK76mfe RBrsus1gs+biYxYHR4+ju30wBjFGsmXlJ+RUJrBkXOjazF5zhqDj6fhtrA+MJti5GTg4hgYlM Ei0fbboYuYDs34wSZ2/tYYRwNjJK9HQsYIdwehglrvdcYwVpYRMwkjh7dDojiC0iIC1x7fNlM JtZoEbi0dE5YDXCAi4S/7r7mEFsFgFViRcPnwPFOTh4Bbwkvk/KBAlLCChITHn4nhnCNpT4vH Ep8wRGngWMDKsYNYpTi8pSi3QNjfSSijLTM0pyEzNzdA0NzPRyU4uLE9NTcxKTivWS83M3MQI 9zwAEOxgvbww4xCjJwaQkyhuQ/j5SiC8pP6UyI7E4I76oNCe1+BCjDAeHkgTv/lNAOcGi1PTU irTMHGAIwqQlOHiURHidQNK8xQWJucWZ6RCpU4zGHB037/5h4ng283UDsxBLXn5eqpQ4bw1Iq QBIaUZpHtwgWGxcYpSVEuZlBDpNiKcgtSg3swRV/hWjOAejkjDvSZApPJl5JXD7XgGdwgR0iq z9G5BTShIRUlINjApbb3tm/RT47FxrYygqUvlANXeK1H0XXy5/t/93VM4w2DuZaOZH8Mzck7B QOXzZ5fr5JfmNZ+KP3F2eb622dOvPJlfZkgWPvmY7OXroX+bYc+ejxpTpUtrvBG/xiMvwL886 8vPVgccs4t4nb6o3zq2qFFyzs0EwOdHTPvuOpzvPRv0dJrxSSizFGYmGWsxFxYkAavpTIYgCA AA= X-Env-Sender: boris.ostrovsky@oracle.com X-Msg-Ref: server-5.tower-21.messagelabs.com!1508887589!68468345!1 X-Originating-IP: [156.151.31.81] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMTU2LjE1MS4zMS44MSA9PiAyODgzMzk=\n X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 51960 invoked from network); 24 Oct 2017 23:26:30 -0000 Received: from userp1040.oracle.com (HELO userp1040.oracle.com) (156.151.31.81) by server-5.tower-21.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 24 Oct 2017 23:26:30 -0000 Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v9ONQL2I004519 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 24 Oct 2017 23:26:22 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v9ONQLA3022329 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 24 Oct 2017 23:26:21 GMT Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v9ONQK2Q004956; Tue, 24 Oct 2017 23:26:20 GMT Received: from ovs104.us.oracle.com (/10.149.76.204) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 24 Oct 2017 16:26:20 -0700 From: Boris Ostrovsky To: xen-devel@lists.xen.org Date: Tue, 24 Oct 2017 19:30:20 -0400 Message-Id: <1508887820-23533-1-git-send-email-boris.ostrovsky@oracle.com> X-Mailer: git-send-email 1.8.3.1 X-Source-IP: userv0022.oracle.com [156.151.31.74] Cc: andrew.cooper3@citrix.com, julien.grall@arm.com, Boris Ostrovsky , jbeulich@suse.com Subject: [Xen-devel] [PATCH] x86/vpmu: Remove unnecessary call to do_interrupt() 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 This call was left during PVHv1 removal (commit 33e5c32559e1 ("x86: remove PVHv1 code")): - if ( is_pvh_vcpu(sampling) && - !(vpmu_mode & XENPMU_MODE_ALL) && + if ( !(vpmu_mode & XENPMU_MODE_ALL) && !vpmu->arch_vpmu_ops->do_interrupt(regs) ) return; As result of this extra call VPMU no longer works for PV guests on Intel because we effectively lose value of MSR_CORE_PERF_GLOBAL_STATUS. Signed-off-by: Boris Ostrovsky Reviewed-by: Andrew Cooper --- This should also go into 4.9 xen/arch/x86/cpu/vpmu.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/xen/arch/x86/cpu/vpmu.c b/xen/arch/x86/cpu/vpmu.c index fd2fcac..7baf461 100644 --- a/xen/arch/x86/cpu/vpmu.c +++ b/xen/arch/x86/cpu/vpmu.c @@ -227,10 +227,6 @@ void vpmu_do_interrupt(struct cpu_user_regs *regs) if ( !vpmu->xenpmu_data ) return; - if ( !(vpmu_mode & XENPMU_MODE_ALL) && - !vpmu->arch_vpmu_ops->do_interrupt(regs) ) - return; - if ( vpmu_is_set(vpmu, VPMU_CACHED) ) return;