Messages in this thread | | | Subject | Re: [V2 PATCH 0/6] x86, NMI: give NMI handler a face-lift | From | Peter Zijlstra <> | Date | Mon, 22 Nov 2010 15:29:29 +0100 |
| |
On Mon, 2010-11-22 at 09:22 -0500, Don Zickus wrote: > > > +static bool check_hw_exists(void) > > > +{ > > > + u64 val, val_new; > > > + > > > + val = 0xabcdUL; > > > + (void) checking_wrmsrl(x86_pmu.perfctr, val); > > > + rdmsrl(x86_pmu.perfctr, val_new); > > > > > > Yeah, this looks about right, although for extreme prudence I'd also > use > > a checking_rdmsrl(). > > I didn't realize such a function existed, I'll look into it.
yeah, the msr functions are a bit of a mess, but I think its called something like rdmsrl_safe()
| |