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/
Home Products Support Community News


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

To: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>, Christoph Egger <Christoph.Egger@xxxxxxx>
Subject: Re: [Xen-devel] [PATCH] microcode update support for AMD CPUs
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Mon, 15 Sep 2008 15:42:17 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 15 Sep 2008 07:42:07 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <18638.27841.714797.640342@xxxxxxxxxxxxxxxxxxxxxxxx>
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AckXQT/zfnCs/IM0Ed2j/wAWy6hiGQ==
Thread-topic: [Xen-devel] [PATCH] microcode update support for AMD CPUs
User-agent: Microsoft-Entourage/
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

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