From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754395AbcHAREP (ORCPT ); Mon, 1 Aug 2016 13:04:15 -0400 Received: from mx2.suse.de ([195.135.220.15]:49345 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754104AbcHARD7 (ORCPT ); Mon, 1 Aug 2016 13:03:59 -0400 Subject: Re: [Xen-devel] [PATCH] xen: Make VPMU init message look less scary To: Konrad Rzeszutek Wilk References: <1470051680-17273-1-git-send-email-jgross@suse.com> <20160801141139.GE21356@char.us.oracle.com> Cc: linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org, boris.ostrovsky@oracle.com, david.vrabel@citrix.com From: Juergen Gross Message-ID: <66c1313f-655b-a65e-a84c-05b0e81aed12@suse.com> Date: Mon, 1 Aug 2016 17:48:52 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2 MIME-Version: 1.0 In-Reply-To: <20160801141139.GE21356@char.us.oracle.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/08/16 16:11, Konrad Rzeszutek Wilk wrote: > On Mon, Aug 01, 2016 at 01:41:20PM +0200, Juergen Gross wrote: >> 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 >> --- >> 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..e9d66fa 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 usage disabled due to Xen settings\n"); > > How about 'VPMU disabled by hypevisor.' Hmm, why not. Boris, are you okay with this message, too? Juergen