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] MTRR: clear DramModEn bit of sys_cfg MSR

To: Wei Huang <wei.huang2@xxxxxxx>, "'xen-devel@xxxxxxxxxxxxxxxxxxx'" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] MTRR: clear DramModEn bit of sys_cfg MSR
From: Keir Fraser <keir@xxxxxxx>
Date: Tue, 05 Apr 2011 12:51:32 +0100
Cc:
Delivery-date: Tue, 05 Apr 2011 04:52:31 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:user-agent:date:subject:from:to :message-id:thread-topic:thread-index:in-reply-to:mime-version :content-type:content-transfer-encoding; bh=/oe2nZ8hInt5W+sZ8TNsYXlxKwjtCx9bd7E6H3hG1yk=; b=qHxOVmS/VtwvFkb3W2MGBEaAmrv00Slh4ncycM0GCucvJQJ8fthXnpgIi+/mHRbTnq Z535Ymwi4viwCGjmHpbA4lkpNEZx1iD/jpyR81GqwABA9Mg4P9MEiN/VuOIB4wZW8YX/ U0gjniDWiwq7swKbN38ebDsmQO+Mr/MPalV58=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:user-agent:date:subject:from:to:message-id:thread-topic :thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; b=Iq3MqbX6dHAtsK5fJLvXdhlZb39887UsCrnD1BRyfFfdNIXNlPYR6CBfS9N6pJdzO7 WXYnbDWMBxV1id3H1ltN5WfUuLEn7RPR06MduREUbEbmBaRvWWqL0rxdaUKigqROUe5k TyxEMy4l4ClJhOG/kICfh9dTl37aT0veqFxdM=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4D9A44E2.2060103@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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acvzh85z9ytHTuZNXUaEonjnFAy0kQ==
Thread-topic: [Xen-devel] [PATCH] MTRR: clear DramModEn bit of sys_cfg MSR
User-agent: Microsoft-Entourage/12.28.0.101117
On 04/04/2011 23:23, "Wei Huang" <wei.huang2@xxxxxxx> wrote:

> Some buggy BIOS might set sys_cfg DramModEn bit to 1, which can cause
> unexpected behavior on AMD platforms. This patch clears DramModEn bit.
> The patch was derived from upstream kernel patch (see
> https://patchwork.kernel.org/patch/11425/).

This patch also removes k8_enable_fixed_iorrs(), and it's not clear why.
That would at least belong in a separate patch, but I would think we don't
want to delete that code anyway.

The indentation is wrong (spaces in a file that is hard-tab-indented). And
the printk is probably unnecessary -- at most you should print it once
rather than potentially for every core brought up.

But further, I don't see why you need to hang off {get,set}_fixed_ranges at
all. Why not do this check-and-fixup in cpu/amd.c:init_amd()? It's a handy
early-cpu-bringup amd-specific function which is rather designed ofr this
kind of purpose. The k8_enable_fixed_iorrs() work could better be done in
the same place, too (perhaps move it in a separate patch?).

 -- Keir

> Signed-off-by: Wei Huang <wei.huang2@xxxxxxx>
> 
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel



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