WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: Christoph Egger <Christoph.Egger@xxxxxxx>
Subject: Re: [Xen-devel] [PATCH] microcode update support for AMD CPUs
From: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Date: Mon, 15 Sep 2008 15:10:09 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 15 Sep 2008 07:10:48 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <200809121431.22715.Christoph.Egger@xxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Newsgroups: chiark.mail.xen.devel
References: <200809121431.22715.Christoph.Egger@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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 ?

Ian.

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

<Prev in Thread] Current Thread [Next in Thread>