[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCH v3] x86/NMI: Allow processing unknown NMIs when watchdog is enabled
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
> `= <integer>`
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
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|