On Tue, Mar 01, 2016 at 07:04:40PM +0100, Jiri Olsa wrote: > > That's the PERF_GLOBAL_CTRL, right? But it must have succeeded, > > yep, should be this one: > > static void __intel_pmu_enable_all(int added, bool pmi) > { > struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); > > intel_pmu_pebs_enable_all(); > intel_pmu_lbr_enable_all(pmi); > >>> wrmsrl(MSR_CORE_PERF_GLOBAL_CTRL, > x86_pmu.intel_ctrl & ~cpuc->intel_ctrl_guest_mask); > > > > otherwise the NMI watchdog would never have fired. > > so NMI wouldn't trigger if CPU is inside wrmsr?
Well, anything goes with MSR writes, that's all a magic heap of micro-code. But at the very least it did actually enable the counters, otherwise the counter used for the NMI watchdog could not fire, it too would still be disabled.