RE: [PATCH v10 03/38] x86/msr: Add the WRMSRNS instruction support

2023-09-22 Thread Li, Xin3
> > I notice there are several call sites using the safe version w/o > > checking the return value, should the unsafe version be a better > > choice in such cases? > > Depends. The safe version does not emit a warning on fail. So if the > callsite truly does not care about the error it's fine. Ri

RE: [PATCH v10 03/38] x86/msr: Add the WRMSRNS instruction support

2023-09-22 Thread Thomas Gleixner
On Fri, Sep 22 2023 at 08:16, Xin3 Li wrote: >> > > +static __always_inline void __wrmsrns(u32 msr, u32 low, u32 high) >> > >> > Shouldn't this be named wrmsrns_safe since it has exception handling, >> > similar >> to >> > the current wrmsrl_safe. >> > >> >> Both safe and unsafe versions have exc

RE: [PATCH v10 03/38] x86/msr: Add the WRMSRNS instruction support

2023-09-22 Thread Li, Xin3
> > > +static __always_inline void __wrmsrns(u32 msr, u32 low, u32 high) > > > > Shouldn't this be named wrmsrns_safe since it has exception handling, > > similar > to > > the current wrmsrl_safe. > > > > Both safe and unsafe versions have exception handling, while the safe > version returns an i