RE: [PATCH V4 1/2] x86/msr: expose msr_flip_bit function

2017-03-29 Thread Liang, Kan
> > -static inline int __flip_bit(u32 msr, u8 bit, bool set) > > +int msr_flip_bit(u32 msr, u8 bit, bool set) > > { > > struct msr m, m1; > > int err = -EINVAL; > > @@ -85,6 +85,7 @@ static inline int __flip_bit(u32 msr, u8 bit, bool > > set) > > > > return 1; > > } > > +EXPORT_SYMB

Re: [PATCH V4 1/2] x86/msr: expose msr_flip_bit function

2017-03-28 Thread Thomas Gleixner
On Tue, 28 Mar 2017, kan.li...@intel.com wrote: > From: Kan Liang > > There is no exported kernel interfaces which can flip a MSR bit. It has > to do read-modify-write operation on the MSR through rd/wrmsr* > interfaces. But the method is not atomic. > > There is already __flip_bit support. Just