ia64/xen-unstable

changeset 18778:3450cb9706ac

x86, hvm: Better MTRR type check.
From: Disheng Su <disheng.su@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Nov 06 11:50:21 2008 +0000 (2008-11-06)
parents 6b6610c115fc
children 256067cbf5b3
files xen/arch/x86/hvm/mtrr.c
line diff
     1.1 --- a/xen/arch/x86/hvm/mtrr.c	Thu Nov 06 11:48:11 2008 +0000
     1.2 +++ b/xen/arch/x86/hvm/mtrr.c	Thu Nov 06 11:50:21 2008 +0000
     1.3 @@ -392,7 +392,10 @@ uint32_t get_pat_flags(struct vcpu *v,
     1.4       */
     1.5      if ( pat_entry_value == INVALID_MEM_TYPE )
     1.6      {
     1.7 -        if (mfn_valid(paddr_to_pfn(spaddr)))
     1.8 +        struct domain *d = v->domain;
     1.9 +        p2m_type_t p2mt;
    1.10 +        gfn_to_mfn(d, paddr_to_pfn(gpaddr), &p2mt);
    1.11 +        if (p2m_is_ram(p2mt))
    1.12              gdprintk(XENLOG_WARNING,
    1.13                      "Conflict occurs for a given guest l1e flags:%x "
    1.14                      "at %"PRIx64" (the effective mm type:%d), "