From: "Jan Beulich" Subject: Re: [PATCH v2 2/3] x86/VPMU: Disable VPMU when NMI watchdog is on Date: Fri, 30 Jan 2015 09:41:34 +0000 Message-ID: <54CB5FDE020000780005B2A3@mail.emea.novell.com> References: <1422554319-1906-1-git-send-email-boris.ostrovsky@oracle.com> <1422554319-1906-3-git-send-email-boris.ostrovsky@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YH852-00083P-SG for xen-devel@lists.xenproject.org; Fri, 30 Jan 2015 09:41:36 +0000 In-Reply-To: <1422554319-1906-3-git-send-email-boris.ostrovsky@oracle.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Boris Ostrovsky Cc: andrew.cooper3@citrix.com, kevin.tian@intel.com, dietmar.hahn@ts.fujitsu.com, xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org >>> On 29.01.15 at 18:58, wrote: > @@ -219,6 +220,13 @@ void vpmu_initialise(struct vcpu *v) > uint8_t vendor = current_cpu_data.x86_vendor; > int ret; > > + /* NMI watchdog uses LVTPC and HW counter */ > + if ( opt_watchdog && opt_vpmu_enabled ) > + { > + printk(XENLOG_G_WARNING "NMI watchdog is enabled. Turning VPMU off.\n"); > + opt_vpmu_enabled = 0; > + } I think this should be a boot time warning (and not guest level, so it won't become suppressed due to rate limiting when default are in effect), and I thought you said so on the previous version's thread too. If there's no other suitable place, just add a small initcall. > --- a/xen/arch/x86/nmi.c > +++ b/xen/arch/x86/nmi.c > @@ -42,7 +42,7 @@ static DEFINE_PER_CPU(struct timer, nmi_timer); > static DEFINE_PER_CPU(unsigned int, nmi_timer_ticks); > > /* opt_watchdog: If true, run a watchdog NMI on each processor. */ > -bool_t __initdata opt_watchdog = 0; > +bool_t __read_mostly opt_watchdog = 0; The above would eliminate the need for this change too. Jan