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

[Xen-changelog] [IA64] Fix a vtlb bug and do some cleanup



# HG changeset patch
# User awilliam@xxxxxxxxxxx
# Node ID 7bba3c5af9a8c5f4f78b0a8aadd56235252015d3
# Parent  07a75bf044b4811de09695a26327f64df70fb80f
[IA64] Fix a vtlb bug and do some cleanup

Signed-off-by: Anthony Xu <anthony.xu@xxxxxxxxx>
---
 xen/arch/ia64/vmx/vmmu.c |    4 +-
 xen/arch/ia64/vmx/vtlb.c |   80 +++++++++++++++++++++++------------------------
 2 files changed, 42 insertions(+), 42 deletions(-)

diff -r 07a75bf044b4 -r 7bba3c5af9a8 xen/arch/ia64/vmx/vmmu.c
--- a/xen/arch/ia64/vmx/vmmu.c  Fri May 12 08:13:18 2006 -0600
+++ b/xen/arch/ia64/vmx/vmmu.c  Fri May 12 08:27:51 2006 -0600
@@ -138,7 +138,7 @@ static void init_domain_vhpt(struct vcpu
     }
     vbase = page_to_virt(page);
     memset(vbase, 0, VCPU_VHPT_SIZE);
-    printk("Allocate domain tlb at 0x%p\n", vbase);
+    printk("Allocate domain vhpt at 0x%p\n", vbase);
     
     VHPT(v,hash) = vbase;
     VHPT(v,hash_sz) = VCPU_VHPT_SIZE/2;
@@ -161,7 +161,7 @@ void init_domain_tlb(struct vcpu *v)
     }
     vbase = page_to_virt(page);
     memset(vbase, 0, VCPU_VTLB_SIZE);
-    printk("Allocate domain tlb at 0x%p\n", vbase);
+    printk("Allocate domain vtlb at 0x%p\n", vbase);
     
     VTLB(v,hash) = vbase;
     VTLB(v,hash_sz) = VCPU_VTLB_SIZE/2;
diff -r 07a75bf044b4 -r 7bba3c5af9a8 xen/arch/ia64/vmx/vtlb.c
--- a/xen/arch/ia64/vmx/vtlb.c  Fri May 12 08:13:18 2006 -0600
+++ b/xen/arch/ia64/vmx/vtlb.c  Fri May 12 08:27:51 2006 -0600
@@ -274,36 +274,36 @@ static void vtlb_purge(thash_cb_t *hcb, 
 static void vtlb_purge(thash_cb_t *hcb, u64 va, u64 ps)
 {
     thash_data_t *hash_table, *prev, *next;
-    u64 start, end, size, tag, rid;
+    u64 start, end, size, tag, rid, def_size;
     ia64_rr vrr;
     vcpu_get_rr(current, va, &vrr.rrval);
     rid = vrr.rid;
     size = PSIZE(ps);
     start = va & (-size);
     end = start + size;
+    def_size = PSIZE(vrr.ps);
     while(start < end){
         hash_table = vsa_thash(hcb->pta, start, vrr.rrval, &tag);
-//         tag = ia64_ttag(start);
         if(!INVALID_TLB(hash_table)){
-       if(hash_table->etag == tag){
-            __rem_hash_head(hcb, hash_table);
-       }
-           else{
-           prev=hash_table;
-               next=prev->next;
-               while(next){
-                       if(next->etag == tag){
-                           prev->next=next->next;
-                           cch_free(hcb,next);
-                           hash_table->len--;
-                           break;
-                       }
-                       prev=next;
-                   next=next->next;
-           }
-       }
-        }
-           start += PAGE_SIZE;
+            if(hash_table->etag == tag){
+                __rem_hash_head(hcb, hash_table);
+            }
+            else{
+                prev=hash_table;
+                next=prev->next;
+                while(next){
+                    if(next->etag == tag){
+                        prev->next=next->next;
+                        cch_free(hcb,next);
+                        hash_table->len--;
+                        break;
+                    }
+                    prev=next;
+                    next=next->next;
+                }
+            }
+        }
+        start += def_size;
     }
 //    machine_tlb_purge(va, ps);
 }
@@ -319,26 +319,26 @@ static void vhpt_purge(thash_cb_t *hcb, 
     start = va & (-size);
     end = start + size;
     while(start < end){
-       hash_table = (thash_data_t *)ia64_thash(start);
-           tag = ia64_ttag(start);
-       if(hash_table->etag == tag ){
+        hash_table = (thash_data_t *)ia64_thash(start);
+        tag = ia64_ttag(start);
+        if(hash_table->etag == tag ){
             __rem_hash_head(hcb, hash_table);
-       }
-           else{
-           prev=hash_table;
-               next=prev->next;
-               while(next){
-                       if(next->etag == tag){
-                           prev->next=next->next;
-                           cch_free(hcb,next);
-                           hash_table->len--;
-                           break;
-                       }
-                       prev=next;
-                   next=next->next;
-           }
-       }
-           start += PAGE_SIZE;
+        }
+        else{
+            prev=hash_table;
+            next=prev->next;
+            while(next){
+                if(next->etag == tag){
+                    prev->next=next->next;
+                    cch_free(hcb,next);
+                    hash_table->len--;
+                    break;
+                }
+                prev=next;
+                next=next->next;
+            }
+        }
+        start += PAGE_SIZE;
     }
     machine_tlb_purge(va, ps);
 }

_______________________________________________
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®.