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-changelog

[Xen-changelog] [xen-unstable] x86, hvm: MTRR can't cover all the memery

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86, hvm: MTRR can't cover all the memery ranges
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 24 Jan 2008 07:10:21 -0800
Delivery-date: Thu, 24 Jan 2008 07:12:07 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1201185635 0
# Node ID 6269a3ce7b830f6903a61e1116331590b47f7e99
# Parent  74a9bfccddba0fedd59c57e5f1a76d83a4178d7c
x86, hvm: MTRR can't cover all the memery ranges
MTRR can't cover all the memery ranges, due to guest E820 is changed
by CS:16728 with current method.
Signed-off-by: Disheng Su <disheng.su@xxxxxxxxx>
---
 xen/arch/x86/hvm/mtrr.c |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletion(-)

diff -r 74a9bfccddba -r 6269a3ce7b83 xen/arch/x86/hvm/mtrr.c
--- a/xen/arch/x86/hvm/mtrr.c   Thu Jan 24 14:39:38 2008 +0000
+++ b/xen/arch/x86/hvm/mtrr.c   Thu Jan 24 14:40:35 2008 +0000
@@ -186,7 +186,14 @@ static uint32_t range_to_mtrr(uint32_t r
                               uint8_t type)
 {
     if ( !range_sizek || (reg >= ((m->mtrr_cap & 0xff) - RESERVED_MTRR)) )
+    {
+        gdprintk(XENLOG_WARNING,
+                "Failed to init var mtrr msr[%d]"
+                "range_size:%x, total available MSR:%d\n",
+                reg, range_sizek,
+                (uint32_t)((m->mtrr_cap & 0xff) - RESERVED_MTRR));
         return reg;
+    }
 
     while ( range_sizek )
     {
@@ -202,7 +209,13 @@ static uint32_t range_to_mtrr(uint32_t r
         range_sizek  -= sizek;
 
         if ( reg >= ((m->mtrr_cap & 0xff) - RESERVED_MTRR) )
+        {
+            gdprintk(XENLOG_WARNING,
+                    "Failed to init var mtrr msr[%d],"
+                    "total available MSR:%d\n",
+                    reg, (uint32_t)((m->mtrr_cap & 0xff) - RESERVED_MTRR));
             break;
+        }
     }
 
     return reg;
@@ -253,7 +266,7 @@ static void setup_var_mtrrs(struct vcpu 
         {
             if ( e820_table[i].addr == 0x100000 )
             {
-                size = e820_table[i].size + 0x100000 + PAGE_SIZE * 3;
+                size = e820_table[i].size + 0x100000 + PAGE_SIZE * 4;
                 addr = 0;
             }
             else

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86, hvm: MTRR can't cover all the memery ranges, Xen patchbot-unstable <=