Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1512238
| From | Wanpeng Li <kernellwp@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v6 1/2] x86/msr: Add write msr notrace |
| Date | 2016-10-31 00:40 +0100 |
| Message-ID | <sy7RL-2Pp-5@gated-at.bofh.it> (permalink) |
| References | <swKDU-5nU-9@gated-at.bofh.it> <swKDU-5nU-7@gated-at.bofh.it> <sxivT-2mo-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
2016-10-29 0:47 GMT+08:00 Borislav Petkov <bp@alien8.de>: [...] >> >> /* Can be uninlined because referenced by paravirt */ >> -notrace static inline void native_write_msr(unsigned int msr, >> +notrace static inline void __native_write_msr_notrace(unsigned int msr, >> unsigned low, unsigned high) > ^^^^^^^ > Align arguments on an opening brace. Other functions like native_write_msr() and native_write_msr_safe() etc are also not aligned, so your suggestion maybe result in inconsistent. > > Also, please fix that in a patch ontop of this one: > > WARNING: storage class should be at the beginning of the declaration > #43: FILE: arch/x86/include/asm/msr.h:118: > +notrace static inline void __native_write_msr_notrace(unsigned int msr, > > WARNING: Prefer 'unsigned int' to bare use of 'unsigned' > #54: FILE: arch/x86/include/asm/msr.h:129: > + unsigned low, unsigned high) > > And because we know what those are, you can convert them directly to u32. Ditto. > > IOW, the end result should be something like this: > > static inline void notrace > __native_write_msr_notrace(unsigned int msr, u32 low, u32 high) > > And yes, I suggested using the "_notrace" suffix for the name but then > it would look funny if we end up using it in code. > > So maybe we should make that lower-level helper simply: > > static inline void notrace > __native_write_msr(unsigned int msr, u32 low, u32 high) > > to denote that it does purely the WRMSR operation and nothing else. > > Yap, that looks the cleanest to me. Agreed. Regards, Wanpeng Li
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v6 1/2] x86/msr: Add write msr notrace Wanpeng Li <kernellwp@gmail.com> - 2016-10-27 06:40 +0200
Re: [PATCH v6 1/2] x86/msr: Add write msr notrace Borislav Petkov <bp@alien8.de> - 2016-10-28 18:50 +0200
Re: [PATCH v6 1/2] x86/msr: Add write msr notrace Wanpeng Li <kernellwp@gmail.com> - 2016-10-31 00:40 +0100
Re: [PATCH v6 1/2] x86/msr: Add write msr notrace Borislav Petkov <bp@alien8.de> - 2016-10-31 00:50 +0100
Re: [PATCH v6 1/2] x86/msr: Add write msr notrace Wanpeng Li <kernellwp@gmail.com> - 2016-10-31 02:50 +0100
csiph-web