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

[Xen-changelog] [xen-unstable] [IA64] Fix vga acceleration for VTI domain



# HG changeset patch
# User awilliam@xxxxxxxxxxx
# Node ID e62685b48500c2fffec94570cbe7940fd77ad112
# Parent  97226bfc659c104fbf2c07c087294860db2cfd7a
[IA64] Fix vga acceleration for VTI domain

Now guest vhpt table of VMX domain is searched to insert some
entry into vtlb on the fly. However previous guard on memory 
attribute is only done for guest itc.d emulation. That breaks
VGA acceleration and this patch fixes it by moving check to
right place.

Signed-off-by Kevin Tian <kevin.tian@xxxxxxxxx>
---
 xen/arch/ia64/vmx/vmmu.c |   14 ++------------
 xen/arch/ia64/vmx/vtlb.c |    7 +++++++
 2 files changed, 9 insertions(+), 12 deletions(-)

diff -r 97226bfc659c -r e62685b48500 xen/arch/ia64/vmx/vmmu.c
--- a/xen/arch/ia64/vmx/vmmu.c  Tue Jun 13 13:13:39 2006 -0600
+++ b/xen/arch/ia64/vmx/vmmu.c  Tue Jun 13 15:05:33 2006 -0600
@@ -373,18 +373,8 @@ IA64FAULT vmx_vcpu_itc_d(VCPU *vcpu, UIN
     }
 #endif //VTLB_DEBUG
     gpfn = (pte & _PAGE_PPN_MASK)>> PAGE_SHIFT;
-    if (VMX_DOMAIN(vcpu)) {
-        if (__gpfn_is_io(vcpu->domain, gpfn))
-            pte |= VTLB_PTE_IO;
-        else{
-           if ((pte & _PAGE_MA_MASK)!=_PAGE_MA_NAT)
-            /* Ensure WB attribute if pte is related to a normal mem page,
-             * which is required by vga acceleration since qemu maps shared
-             * vram buffer with WB.
-             */
-                pte &= ~_PAGE_MA_MASK;
-       }
-    }
+    if (VMX_DOMAIN(vcpu) && __gpfn_is_io(vcpu->domain, gpfn))
+        pte |= VTLB_PTE_IO;
     thash_purge_and_insert(vcpu, pte, itir, ifa);
     return IA64_NO_FAULT;
 
diff -r 97226bfc659c -r e62685b48500 xen/arch/ia64/vmx/vtlb.c
--- a/xen/arch/ia64/vmx/vtlb.c  Tue Jun 13 13:13:39 2006 -0600
+++ b/xen/arch/ia64/vmx/vtlb.c  Tue Jun 13 15:05:33 2006 -0600
@@ -446,6 +446,13 @@ void thash_purge_and_insert(VCPU *v, u64
     ps = itir_ps(itir);
 
     if(VMX_DOMAIN(v)){
+        /* Ensure WB attribute if pte is related to a normal mem page,
+         * which is required by vga acceleration since qemu maps shared
+         * vram buffer with WB.
+         */
+        if (!(pte & VTLB_PTE_IO) && ((pte & _PAGE_MA_MASK) != _PAGE_MA_NAT))
+            pte &= ~_PAGE_MA_MASK;
+
         phy_pte = translate_phy_pte(v, &pte, itir, ifa);
         if(ps==PAGE_SHIFT){
             if(!(pte&VTLB_PTE_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®.