diff -Nur --exclude='*.o' --exclude='*.s' --exclude='*.swp' --exclude=compile.h --exclude=serial.c xen-unstable.hg/xen/arch/x86/nmi.c xen-unstable.hg.new/xen/arch/x86/nmi.c --- xen-unstable.hg/xen/arch/x86/nmi.c 2007-12-19 14:18:45.000000000 -0800 +++ xen-unstable.hg.new/xen/arch/x86/nmi.c 2007-12-19 09:21:29.000000000 -0800 @@ -39,6 +39,8 @@ static DEFINE_PER_CPU(struct timer, nmi_timer); static DEFINE_PER_CPU(unsigned int, nmi_timer_ticks); +extern int opt_watchdog; + /* * lapic_nmi_owner tracks the ownership of the lapic NMI hardware: * - it may be reserved by some other driver, or not @@ -169,6 +171,9 @@ static void enable_lapic_nmi_watchdog(void) { + if ( !opt_watchdog ) + return; + if (nmi_active < 0) { nmi_watchdog = NMI_LOCAL_APIC; setup_apic_nmi_watchdog(); @@ -351,7 +356,8 @@ void watchdog_disable(void) { - atomic_inc(&watchdog_disable_count); + if ( opt_watchdog ) + atomic_inc(&watchdog_disable_count); } void watchdog_enable(void) @@ -359,6 +365,9 @@ static unsigned long heartbeat_initialised; unsigned int cpu; + if ( !opt_watchdog ) + return; + if ( !atomic_dec_and_test(&watchdog_disable_count) || test_and_set_bit(0, &heartbeat_initialised) ) return; diff -Nur --exclude='*.o' --exclude='*.s' --exclude='*.swp' --exclude=compile.h --exclude=serial.c xen-unstable.hg/xen/arch/x86/setup.c xen-unstable.hg.new/xen/arch/x86/setup.c --- xen-unstable.hg/xen/arch/x86/setup.c 2007-12-19 14:18:45.000000000 -0800 +++ xen-unstable.hg.new/xen/arch/x86/setup.c 2007-12-19 09:21:29.000000000 -0800 @@ -72,7 +72,7 @@ integer_param("maxcpus", max_cpus); /* opt_watchdog: If true, run a watchdog NMI on each processor. */ -static int opt_watchdog = 0; +int opt_watchdog = 0; boolean_param("watchdog", opt_watchdog); /* **** Linux config option: propagated to domain0. */ @@ -950,8 +950,7 @@ do_initcalls(); - if ( opt_watchdog ) - watchdog_enable(); + watchdog_enable(); /* Create initial domain 0. */ dom0 = domain_create(0, 0, DOM0_SSIDREF);