ia64/xen-unstable

changeset 16876:6269a3ce7b83

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@intel.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Jan 24 14:40:35 2008 +0000 (2008-01-24)
parents 74a9bfccddba
children 31adb5c972d0
files xen/arch/x86/hvm/mtrr.c
line diff
     1.1 --- a/xen/arch/x86/hvm/mtrr.c	Thu Jan 24 14:39:38 2008 +0000
     1.2 +++ b/xen/arch/x86/hvm/mtrr.c	Thu Jan 24 14:40:35 2008 +0000
     1.3 @@ -186,7 +186,14 @@ static uint32_t range_to_mtrr(uint32_t r
     1.4                                uint8_t type)
     1.5  {
     1.6      if ( !range_sizek || (reg >= ((m->mtrr_cap & 0xff) - RESERVED_MTRR)) )
     1.7 +    {
     1.8 +        gdprintk(XENLOG_WARNING,
     1.9 +                "Failed to init var mtrr msr[%d]"
    1.10 +                "range_size:%x, total available MSR:%d\n",
    1.11 +                reg, range_sizek,
    1.12 +                (uint32_t)((m->mtrr_cap & 0xff) - RESERVED_MTRR));
    1.13          return reg;
    1.14 +    }
    1.15  
    1.16      while ( range_sizek )
    1.17      {
    1.18 @@ -202,7 +209,13 @@ static uint32_t range_to_mtrr(uint32_t r
    1.19          range_sizek  -= sizek;
    1.20  
    1.21          if ( reg >= ((m->mtrr_cap & 0xff) - RESERVED_MTRR) )
    1.22 +        {
    1.23 +            gdprintk(XENLOG_WARNING,
    1.24 +                    "Failed to init var mtrr msr[%d],"
    1.25 +                    "total available MSR:%d\n",
    1.26 +                    reg, (uint32_t)((m->mtrr_cap & 0xff) - RESERVED_MTRR));
    1.27              break;
    1.28 +        }
    1.29      }
    1.30  
    1.31      return reg;
    1.32 @@ -253,7 +266,7 @@ static void setup_var_mtrrs(struct vcpu 
    1.33          {
    1.34              if ( e820_table[i].addr == 0x100000 )
    1.35              {
    1.36 -                size = e820_table[i].size + 0x100000 + PAGE_SIZE * 3;
    1.37 +                size = e820_table[i].size + 0x100000 + PAGE_SIZE * 4;
    1.38                  addr = 0;
    1.39              }
    1.40              else