On 24/06/2010 21:11, "Kathy Hadley"
<Kathy.Hadley@dornerworks.com> wrote:
> 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:
The parentheses aren''t needed, but the val1 and val2 switcharound is
indeed
correct. Thanks for the patch. I don''t know why only you saw this;
it''s
probably something to do with the particular machine you test on.
-- Keir
> (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 */
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel