+#define rdmsr(msr,val1,val2) \You're silently changing the behavior (as well as the prototype) here, rdmsr() used to fail loudly, now it fails silently, with no way for the caller to check.
+ do { \
+ int __err; \
+ unsigned long long __val = native_read_msr(msr, &__err); \
+ val1 = __val; \
+ val2 = __val >> 32; \
+ } while(0)
+
Hi Avi!
Not sure what you're saying about the prototype: the old macro was:
-#define rdmsr(msr,val1,val2) \
- __asm__ __volatile__("rdmsr" \
- : "=a" (val1), "=d" (val2) \
- : "c" (msr))
-
Which doesn't seem to be a great difference to me.
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?