>>> On 26.06.18 at 20:22, <andrew.coop...@citrix.com> wrote: > --- a/xen/include/asm-x86/msr.h > +++ b/xen/include/asm-x86/msr.h > @@ -11,6 +11,11 @@ > #include <asm/asm_defns.h> > #include <asm/cpufeature.h> > > +static inline void rdmsr_split(unsigned int msr, uint32_t *lo, uint32_t *hi) > +{ > + asm volatile ( "rdmsr" : "=a" (*lo), "=d" (*hi) : "c" (msr) );
What's the reason for not making this ... > +} > + > #define rdmsr(msr,val1,val2) \ > __asm__ __volatile__("rdmsr" \ > : "=a" (val1), "=d" (val2) \ ... use this and ... > @@ -23,6 +28,11 @@ > val = a__ | ((u64)b__<<32); \ > } while(0) > > +static inline void wrmsr_split(unsigned int msr, uint32_t lo, uint32_t hi) > +{ > + asm volatile ( "wrmsr" :: "a" (lo), "d" (hi), "c" (msr) ); ... this use ... > +} > + > #define wrmsr(msr,val1,val2) \ > __asm__ __volatile__("wrmsr" \ > : /* no outputs */ \ ... this? In fact it's not really clear why we need the inline functions _and_ the macros. Afaict the two new functions below could also be implemented with just the macros. Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel