Re: [RFC PATCH 1/3] x86: Add another set of MSR accessor functions

2014-02-17 Thread Borislav Petkov
On Mon, Feb 17, 2014 at 08:21:47AM -0800, H. Peter Anvin wrote: > Good patch series overall, but I do have some issues with this one: > > On 02/09/2014 05:48 AM, Borislav Petkov wrote: > > + */ > > +int msr_read(u32 msr, struct msr *m) > > +{ > > + int err; > > + u64 val; > > + > > + val = n

Re: [RFC PATCH 1/3] x86: Add another set of MSR accessor functions

2014-02-17 Thread H. Peter Anvin
Good patch series overall, but I do have some issues with this one: On 02/09/2014 05:48 AM, Borislav Petkov wrote: > + */ > +int msr_read(u32 msr, struct msr *m) > +{ > + int err; > + u64 val; > + > + val = native_read_msr_safe(msr, &err); I don't think we should use the native_ funct

[RFC PATCH 1/3] x86: Add another set of MSR accessor functions

2014-02-09 Thread Borislav Petkov
From: Borislav Petkov We very often need to set or clear a bit in an MSR as a result of doing some sort of a hardware configuration. Add generic versions of that repeated functionality in order to save us a bunch of duplicated code in the early CPU vendor detection/config code. Signed-off-by: Bo