[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 1/2] x86/VPMU: Disable VPMU when NMI watchdog is on



On 28/01/2015 19:56, Boris Ostrovsky wrote:
> NMI watchdog sets APIC_LVTPC register to generate an NMI when PMU counter
> overflow occurs. This may be overwritten by VPMU code later, effectively
> turning off the watchdog.
>
> We should disable VPMU when NMI watchdog is running.
>
> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>

I completely agree with the aim, but this patch is clunky and you have
missed the case where neither 'watchdog' nor 'vpmu' is specified on the
command line, but the booleans have been tweaked (which is the XenServer
way of choosing defaults while keeping the length of the command line down).

A more simple approach, which doesn't involve exposing opt_vpmu_enabled
or changing any nmi code, would be to have a check in vpmu_initialise()
which checks for opt_watchdog and opt_vpmu_enabled and bail.

Looking at the code in tree, it seems odd opt_vpmu_enabled is passed to
the sub initialise functions to be acted upon.  Is this something which
is cleaned up or changed in your series?  If not, it perhaps should be. 
Also, under what conditions would you expect this initialise function to
be called on a vcpu, and to find its vpmu already active?

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.