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] MTRR issue introduced by c/s 17404

To: "Keir Fraser" <keir.fraser@xxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] MTRR issue introduced by c/s 17404
From: "Han, Weidong" <weidong.han@xxxxxxxxx>
Date: Thu, 10 Apr 2008 17:16:52 +0800
Cc: "Su, Disheng" <disheng.su@xxxxxxxxx>
Delivery-date: Thu, 10 Apr 2008 02:29:00 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C42391F9.1EFBE%keir.fraser@xxxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <08DF4D958216244799FC84F3514D70F0013CE306@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <C42391F9.1EFBE%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acia5ZUvVTcK+vvBSNK5ac0sZHCJsgAAX8zqAAD6WOA=
Thread-topic: [Xen-devel] MTRR issue introduced by c/s 17404
The small fix is just changing the magic number in setup_var_mtrrs():

diff -r 5b25d3264f7e xen/arch/x86/hvm/mtrr.c
--- a/xen/arch/x86/hvm/mtrr.c   Wed Apr 09 17:49:25 2008 +0100
+++ b/xen/arch/x86/hvm/mtrr.c   Thu Apr 10 10:40:56 2008 +0800
@@ -266,7 +266,7 @@ static void setup_var_mtrrs(struct vcpu 
         {
             if ( e820_table[i].addr == 0x100000 )
             {
-                size = e820_table[i].size + 0x100000 + PAGE_SIZE * 4;
+                size = e820_table[i].size + 0x100000 + PAGE_SIZE * 5;
                 addr = 0;
             }
             else


Disheng, do you have any good idea?

Randy (Weidong)

Keir Fraser wrote:
> But that's an existing range that is extended, rather than a new
> range being declared. So how come the MTRR code gets confused?
> 
> Anyway, its days are numbered since I plan to move it out into
> hvmloader. But please send a fix for now.
> 
>  -- Keir
> 
> On 10/4/08 09:33, "Han, Weidong" <weidong.han@xxxxxxxxx> wrote:
> 
>> Due to c/s 17404 reserves one more special page in build_e820map(),
>> MTRR can't cover all memory ranges. In order to fix it, need to do
>> relevant changing in setup_var_mtrrs() which uses magic number to
>> caculate size. It's the second time this issue occurs. It's better
>> to get rid the magic number. Thanks! 
>> 
>> Randy (Weidong)
>> 
>> _______________________________________________
>> Xen-devel mailing listcd 
>> Xen-devel@xxxxxxxxxxxxxxxxxxx
>> http://lists.xensource.com/xen-devel


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

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