From: Ian Jackson Subject: Re: [PATCH] microcode update support for AMD CPUs Date: Mon, 15 Sep 2008 15:10:09 +0100 Message-ID: <18638.27841.714797.640342@mariner.uk.xensource.com> References: <200809121431.22715.Christoph.Egger@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <200809121431.22715.Christoph.Egger@amd.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Christoph Egger Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org 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.