From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ross Lagerwall Subject: Re: [PATCH v3] x86/NMI: Allow processing unknown NMIs when watchdog is enabled Date: Mon, 1 Sep 2014 14:27:44 +0100 Message-ID: <54047450.2080004@citrix.com> References: <1409156728-4995-1-git-send-email-ross.lagerwall@citrix.com> <53FF379C.8070701@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <53FF379C.8070701@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper , Xen-devel Cc: Keir Fraser , Jan Beulich List-Id: xen-devel@lists.xenproject.org On 08/28/2014 03:07 PM, Andrew Cooper wrote: >> Run an NMI watchdog on each processor. If a processor is stuck for >> -longer than the **watchdog\_timeout**, a panic occurs. >> +longer than the **watchdog\_timeout**, a panic occurs. When `force` is >> +specified, in addition to running an NMI watchdog on each processor, >> +unknown NMIs will still be processed. >> >> ### watchdog\_timeout >> > `= ` >> diff --git a/xen/arch/x86/nmi.c b/xen/arch/x86/nmi.c >> index c4427a6..873427f 100644 >> --- a/xen/arch/x86/nmi.c >> +++ b/xen/arch/x86/nmi.c >> @@ -43,7 +43,18 @@ 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; >> -boolean_param("watchdog", opt_watchdog); >> + >> +/* watchdog_force: If true, process unknown NMIs when running the watchdog. */ >> +bool_t watchdog_force = 0; >> + >> +static void __init parse_watchdog(char * s) >> +{ >> + opt_watchdog = !!parse_bool(s); > > A lot of code in Xen gets the use of parse_bool() wrong. In this case, > opt_watchdog will be set if garbage is passed in the parameter, which is > a change in behaviour from before. > This is not a change in behavior from before. A bool param if specified on the command-line is set to true unless explicitly set to a false-like value (e.g. this is how a bare parameter like "watchdog" enables the watchdog). As it has been committed, the behavior has been changed and means setting "watchdog" on the command-line does not result in the watchdog being enabled. -- Ross Lagerwall