From patchwork Tue Aug 2 06:43:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juergen Gross X-Patchwork-Id: 9255217 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 283AC6048B for ; Tue, 2 Aug 2016 06:46:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 18DDE28506 for ; Tue, 2 Aug 2016 06:46:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0DC8528508; Tue, 2 Aug 2016 06:46: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 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 A63FC28506 for ; Tue, 2 Aug 2016 06:46: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 1bUTQR-00022g-L1; Tue, 02 Aug 2016 06:43:39 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bUTQP-00022a-N7 for xen-devel@lists.xenproject.org; Tue, 02 Aug 2016 06:43:37 +0000 Received: from [85.158.139.211] by server-13.bemta-5.messagelabs.com id 74/98-12874-81140A75; Tue, 02 Aug 2016 06:43:36 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrDLMWRWlGSWpSXmKPExsVyuP0Ov66E44J wg3dXxSy+b5nM5MDocfjDFZYAxijWzLyk/IoE1oz1K46wFyzjqFj04RRbA+M3ti5GTg4JASOJ txP/MXUxcnAICSxklPhvDxJmE1CV2HD9FCuILSLgKLG6bSmYzSwQJbFqMkSrsIC9xPO/H1hAb Bag+h9HZoHFeYHi7c8WQY2Xk7g+czrTBEbOBYwMqxg1ilOLylKLdA1N9ZKKMtMzSnITM3N0DQ 1M9XJTi4sT01NzEpOK9ZLzczcxAn3FAAQ7GBu2ex5ilORgUhLldfkyP1yILyk/pTIjsTgjvqg 0J7X4EKMMB4eSBO8b+wXhQoJFqempFWmZOcCggUlLcPAoifA2g6R5iwsSc4sz0yFSpxgVpcR5 d4EkBEASGaV5cG2wQL3EKCslzMsIdIgQT0FqUW5mCar8K0ZxDkYlYd7/IFN4MvNK4Ka/AlrMB LT4hAHY4pJEhJRUA6PdgdvKf9onpBtw3LKc+Pdn6yLTBVKpglbXhI9MvOpZ3zF9tmiJqVRH+g kunwLXS9+W+RVLl7mpn06w3brZukR83vnUq6eq2x4m2Lp7LHXcOH2thmXa9knu0opz3/Oo7DP POXv267VNPMGVv1Pkf6VlRlr3ToxhDTlyMeuG3uRvCr3+vyzvbldiKc5INNRiLipOBABLOxED TwIAAA== X-Env-Sender: jgross@suse.com X-Msg-Ref: server-3.tower-206.messagelabs.com!1470120216!48824089!1 X-Originating-IP: [195.135.220.15] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.77; banners=-,-,- X-VirusChecked: Checked Received: (qmail 34436 invoked from network); 2 Aug 2016 06:43:36 -0000 Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by server-3.tower-206.messagelabs.com with DHE-RSA-CAMELLIA256-SHA encrypted SMTP; 2 Aug 2016 06:43:36 -0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id AFF41AC1E; Tue, 2 Aug 2016 06:43:35 +0000 (UTC) From: Juergen Gross To: linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org Date: Tue, 2 Aug 2016 08:43:33 +0200 Message-Id: <1470120213-16683-1-git-send-email-jgross@suse.com> X-Mailer: git-send-email 2.6.6 Cc: Juergen Gross , boris.ostrovsky@oracle.com, david.vrabel@citrix.com Subject: [Xen-devel] [PATCH v2] xen: Make VPMU init message look less scary 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 The default for the Xen hypervisor is to not enable VPMU in order to avoid security issues. In this case the Linux kernel will issue the message "Could not initialize VPMU for cpu 0, error -95" which looks more like an error than a normal state. Change the message to something less scary in case the hypervisor returns EOPNOTSUPP when trying to activate VPMU. Signed-off-by: Juergen Gross --- V2: modify error message as suggested by Konrad Wilk --- arch/x86/xen/pmu.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/x86/xen/pmu.c b/arch/x86/xen/pmu.c index 32bdc2c..bfe8880 100644 --- a/arch/x86/xen/pmu.c +++ b/arch/x86/xen/pmu.c @@ -547,8 +547,11 @@ void xen_pmu_init(int cpu) return; fail: - pr_info_once("Could not initialize VPMU for cpu %d, error %d\n", - cpu, err); + if (err == -EOPNOTSUPP) + pr_info_once("VPMU disabled by hypervisor.\n"); + else + pr_info_once("Could not initialize VPMU for cpu %d, error %d\n", + cpu, err); free_pages((unsigned long)xenpmu_data, 0); }