[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [IA64] Fix HVM VGA abnormal.



# HG changeset patch
# User Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
# Date 1225768042 -32400
# Node ID 10f0e1bb8e5e9a28e1ebe3fbb9291fb8114ef4bc
# Parent  4a5acf020c0fa7654b8ceeb1b4b3f75aeb0b75a8
[IA64] Fix HVM VGA abnormal.

Conversion from p2m entry to physical address, it needs to use
_PAGE_PPN_MASK to mask out some bits which are used by other
purposes by p2m entry.

Sign-off-by : Xiantao Zhang <xiantao.zhang@xxxxxxxxx>
---
 xen/arch/ia64/vmx/vtlb.c |    3 ++-
 xen/arch/ia64/xen/mm.c   |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff -r 4a5acf020c0f -r 10f0e1bb8e5e xen/arch/ia64/vmx/vtlb.c
--- a/xen/arch/ia64/vmx/vtlb.c  Thu Oct 30 11:51:55 2008 +0900
+++ b/xen/arch/ia64/vmx/vtlb.c  Tue Nov 04 12:07:22 2008 +0900
@@ -522,7 +522,8 @@ static u64 translate_phy_pte(VCPU *v, u6
      * which is required by vga acceleration since qemu maps shared
      * vram buffer with WB.
      */
-    if (mfn_valid(maddr >> PAGE_SHIFT) && phy_pte.ma != VA_MATTR_NATPAGE)
+    if (mfn_valid((maddr & _PAGE_PPN_MASK) >> PAGE_SHIFT)
+                               && phy_pte.ma != VA_MATTR_NATPAGE)
         phy_pte.ma = VA_MATTR_WB;
 
     maddr = ((maddr & _PAGE_PPN_MASK) & PAGE_MASK) | (paddr & ~PAGE_MASK);
diff -r 4a5acf020c0f -r 10f0e1bb8e5e xen/arch/ia64/xen/mm.c
--- a/xen/arch/ia64/xen/mm.c    Thu Oct 30 11:51:55 2008 +0900
+++ b/xen/arch/ia64/xen/mm.c    Tue Nov 04 12:07:22 2008 +0900
@@ -926,7 +926,8 @@ __assign_domain_page(struct domain *d,
     /* in HVM guest, when VTD is enabled,
      * P2M entry may change from _PAGE_IO type to real MMIO page 
      */
-    if(VMX_DOMAIN(d->vcpu[0]) && (pte_val(ret_pte) & _PAGE_IO)) {
+    if(is_hvm_domain(d) && (pte_val(ret_pte) & _PAGE_IO) &&
+       !mfn_valid(physaddr >> PAGE_SHIFT)) {
         old_pte = ret_pte;
         goto again_hvm_page_io;
     }

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.