diff --git a/docs/misc/xen-command-line.markdown b/docs/misc/xen-command-line.markdown index aa121fbe5e..64c6fb7887 100644 --- a/docs/misc/xen-command-line.markdown +++ b/docs/misc/xen-command-line.markdown @@ -981,6 +981,8 @@ wrong behaviour (see handle\_pmc\_quirk()). If 'vpmu=bts' is specified the virtualisation of the Branch Trace Store (BTS) feature is switched on on Intel processors supporting this feature. +Note that if **watchdog** option is also specified vpmu will be turned off. + *Warning:* As the BTS virtualisation is not 100% safe and because of the nehalem quirk don't use the vpmu flag on production systems with Intel cpus! diff --git a/xen/arch/x86/hvm/vpmu.c b/xen/arch/x86/hvm/vpmu.c index 27441e27ab..e6795a514b 100644 --- a/xen/arch/x86/hvm/vpmu.c +++ b/xen/arch/x86/hvm/vpmu.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -284,3 +285,15 @@ void vpmu_dump(struct vcpu *v) vpmu->arch_vpmu_ops->arch_vpmu_dump(v); } +static int __init vpmu_init(void) +{ + /* NMI watchdog uses LVTPC and HW counter */ + if ( opt_watchdog && opt_vpmu_enabled ) + { + printk(XENLOG_WARNING "NMI watchdog is enabled. Turning VPMU off.\n"); + opt_vpmu_enabled = 0; + } + + return 0; +} +__initcall(vpmu_init);