[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] microcode update support for AMD CPUs



On 15/9/08 15:10, "Ian Jackson" <Ian.Jackson@xxxxxxxxxxxxx> wrote:

> Christoph Egger writes ("[Xen-devel] [PATCH] microcode update support for AMD
> CPUs"):
>> + edx = (unsigned int)((unsigned long)(addr >> 32));
> 
> This is wrong.  addr is an unsigned long, ie 32 bits so you are
> shifting by >= the word size, which is not permitted.  Helpfully, many
> compilers warn about it.
> 
> But addr came from this:
> addr = (unsigned long)&uci->mc.mc_amd->hdr.data_code;
> surely this cannot be right if you're expecting the address to be
> longer than 32 bits in some cases ?

The code's correct when targeting x86_64. It just isn't careful enough for
the i386 target. I'll check in a fix, since it's pretty trivial.

 -- Keir



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.