WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

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

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [IA64] Fix a vtlb bug and do some cleanup
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 23 May 2006 12:44:35 +0000
Delivery-date: Tue, 23 May 2006 05:49:58 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [IA64] Fix a vtlb bug and do some cleanup, Xen patchbot-unstable <=