Re: [PATCH] Cleanup: rationalize paravirt wrappers

2007-03-23 Thread Avi Kivity
Rusty Russell wrote: 4) Access to the native versions is trivial for KVM, lguest, Xen and others who might want it. kvm will be quite happy with it, as long as the x86_64 version has a similar API. include/asm-x86 anyone? ;-) -- Do not meddle in the internals of kernels, for they are

Re: [PATCH] Cleanup: rationalize paravirt wrappers

2007-03-22 Thread Rusty Russell
On Thu, 2007-03-22 at 10:09 +0200, Avi Kivity wrote: > Right, scratch that. Was confused by rdmsr_safe(). Heh... me too 8) > > The behaviour change (don't oops when an invalid rdmsr is used) was > > there with CONFIG_PARAVIRT=y, the cleanup just made !CONFIG_PARAVIRT the > > same. Is it importa

Re: [PATCH] Cleanup: rationalize paravirt wrappers

2007-03-22 Thread Jeremy Fitzhardinge
Rusty Russell wrote: > The behaviour change (don't oops when an invalid rdmsr is used) was > there with CONFIG_PARAVIRT=y, the cleanup just made !CONFIG_PARAVIRT the > same. Is it important? > We could always fling a BUG_ON in the non-safe versions, which would probably be more informative tha

Re: [PATCH] Cleanup: rationalize paravirt wrappers

2007-03-22 Thread Avi Kivity
Rusty Russell wrote: +#define rdmsr(msr,val1,val2) \ + do {\ + int __err; \ + unsigned long long __val = native_re

Re: [PATCH] Cleanup: rationalize paravirt wrappers

2007-03-22 Thread Rusty Russell
On Thu, 2007-03-22 at 09:30 +0200, Avi Kivity wrote: > Rusty Russell wrote: > > +static inline unsigned long long native_read_msr(unsigned int msr, int > > *err) > > +{ > > + unsigned long long val; > > + > > + asm volatile("2: rdmsr ; xorl %0,%0\n" > > +"1:\n\t" > > +

Re: [PATCH] Cleanup: rationalize paravirt wrappers

2007-03-21 Thread Avi Kivity
Rusty Russell wrote: +static inline unsigned long long native_read_msr(unsigned int msr, int *err) +{ + unsigned long long val; + + asm volatile("2: rdmsr ; xorl %0,%0\n" +"1:\n\t" +".section .fixup,\"ax\"\n\t" +"3: movl %3,