Re: [V2 PATCH 0/6] x86, NMI: give NMI handler a face-lift

From: Peter Zijlstra
Date: Mon Nov 22 2010 - 09:29:29 EST


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()
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/