This patch fixes a error in rdmsr_safe (in
xen/include/asm-x86/msr.h), which was introduced in changeset 21600. The
order of the “val1” and “val2” operands was switched,
and the typecast of val2 needs to be enclosed in parentheses (so that it is
typecast to a uint64_t before the left shift 32 bits). This addresses the
following error seen during DomU start-up:
(XEN) traps.c:2301:d2 Domain attempted WRMSR c0000080
from 0x0000080000000000 to 0x0000080000000800.
Regards,
Kathy Hadley
DornerWorks, Ltd.
diff -rupN a/xen/include/asm-x86/msr.h
b/xen/include/asm-x86/msr.h
--- a/xen/include/asm-x86/msr.h 2010-06-17
13:27:29.000000000 -0400
+++ b/xen/include/asm-x86/msr.h 2010-06-24
15:49:36.000000000 -0400
@@ -49,7 +49,7 @@ static inline void wrmsrl(unsigned int
m
".previous\n" \
:
"=a" (val1), "=d" (val2), "=&r" (_rc) \
:
"c" (msr), "2" (0), "i" (-EFAULT)); \
- val = val2 | ((uint64_t)val1 <<
32); \
+ val = val1 | (((uint64_t)val2)
<< 32); \
_rc; })
/* wrmsr with exception handling */