ia64/xen-unstable

changeset 18690:c19871b66cea

[IA64] fix to translate_phy_pte()

mfn_valid makes sure whether the pfn in question is a normal page.

Signed-off-by: Anthony Xu <anthony.xu@intel.com>
author Isaku Yamahata <yamahata@valinux.co.jp>
date Fri Oct 24 11:47:29 2008 +0900 (2008-10-24)
parents 7ad8c47f5c4b
children b0426fc080f3
files xen/arch/ia64/vmx/vtlb.c
line diff
     1.1 --- a/xen/arch/ia64/vmx/vtlb.c	Fri Oct 24 11:38:09 2008 +0900
     1.2 +++ b/xen/arch/ia64/vmx/vtlb.c	Fri Oct 24 11:47:29 2008 +0900
     1.3 @@ -522,7 +522,7 @@ static u64 translate_phy_pte(VCPU *v, u6
     1.4       * which is required by vga acceleration since qemu maps shared
     1.5       * vram buffer with WB.
     1.6       */
     1.7 -    if (phy_pte.ma != VA_MATTR_NATPAGE)
     1.8 +    if (mfn_valid(maddr >> PAGE_SHIFT) && phy_pte.ma == VA_MATTR_NATPAGE)
     1.9          phy_pte.ma = VA_MATTR_WB;
    1.10  
    1.11      maddr = ((maddr & _PAGE_PPN_MASK) & PAGE_MASK) | (paddr & ~PAGE_MASK);