lkml.org 
[lkml]   [2010]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [V2 PATCH 0/6] x86, NMI: give NMI handler a face-lift
From
Date
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()


\
 
 \ /
  Last update: 2010-11-22 15:31    [W:0.100 / U:1.496 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site