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] [xen-unstable] [IA64] fix domain_flush_vtlb_all()

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [IA64] fix domain_flush_vtlb_all()
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 18 Jan 2007 21:10:47 -0800
Delivery-date: Thu, 18 Jan 2007 22:02:01 -0800
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@xxxxxxxxxxxx
# Date 1168560205 25200
# Node ID 9cbb1d6fb34ab5b831c78a3b3c8e0382739a624d
# Parent  91be8436952d82eacd7e0db3aece8858c3a53150
[IA64] fix domain_flush_vtlb_all()

It might called by another domain's vcpu.

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
---
 xen/arch/ia64/xen/mm.c          |    8 ++++----
 xen/arch/ia64/xen/vhpt.c        |    5 +++--
 xen/include/asm-ia64/tlbflush.h |    2 +-
 3 files changed, 8 insertions(+), 7 deletions(-)

diff -r 91be8436952d -r 9cbb1d6fb34a xen/arch/ia64/xen/mm.c
--- a/xen/arch/ia64/xen/mm.c    Wed Jan 10 10:37:41 2007 -0700
+++ b/xen/arch/ia64/xen/mm.c    Thu Jan 11 17:03:25 2007 -0700
@@ -972,7 +972,7 @@ ioports_deny_access(struct domain *d, un
         // clear pte
         old_pte = ptep_get_and_clear(mm, mpaddr, pte);
     }
-    domain_flush_vtlb_all();
+    domain_flush_vtlb_all(d);
     return 0;
 }
 
@@ -1730,7 +1730,7 @@ domain_page_flush_and_put(struct domain*
 #ifndef CONFIG_XEN_IA64_TLB_TRACK
     //XXX sledgehammer.
     //    flush finer range.
-    domain_flush_vtlb_all();
+    domain_flush_vtlb_all(d);
     put_page(page);
 #else
     switch (tlb_track_search_and_remove(d->arch.tlb_track,
@@ -1749,7 +1749,7 @@ domain_page_flush_and_put(struct domain*
          * queue the page and flush vTLB only once.
          * I.e. The caller must call dfree_flush() explicitly.
          */
-        domain_flush_vtlb_all();
+        domain_flush_vtlb_all(d);
         put_page(page);
         break;
     case TLB_TRACK_NOT_FOUND:
@@ -1783,7 +1783,7 @@ domain_page_flush_and_put(struct domain*
          * So we abondaned to track virtual addresses.
          * full vTLB flush is necessary.
          */
-        domain_flush_vtlb_all();
+        domain_flush_vtlb_all(d);
         put_page(page);
         break;
     case TLB_TRACK_AGAIN:
diff -r 91be8436952d -r 9cbb1d6fb34a xen/arch/ia64/xen/vhpt.c
--- a/xen/arch/ia64/xen/vhpt.c  Wed Jan 10 10:37:41 2007 -0700
+++ b/xen/arch/ia64/xen/vhpt.c  Thu Jan 11 17:03:25 2007 -0700
@@ -258,12 +258,13 @@ static void __vcpu_flush_vtlb_all(void *
        vcpu_flush_vtlb_all((struct vcpu*)vcpu);
 }
 
-void domain_flush_vtlb_all (void)
+// caller must incremented reference count to d somehow.
+void domain_flush_vtlb_all(struct domain* d)
 {
        int cpu = smp_processor_id ();
        struct vcpu *v;
 
-       for_each_vcpu (current->domain, v) {
+       for_each_vcpu(d, v) {
                if (!test_bit(_VCPUF_initialised, &v->vcpu_flags))
                        continue;
 
diff -r 91be8436952d -r 9cbb1d6fb34a xen/include/asm-ia64/tlbflush.h
--- a/xen/include/asm-ia64/tlbflush.h   Wed Jan 10 10:37:41 2007 -0700
+++ b/xen/include/asm-ia64/tlbflush.h   Thu Jan 11 17:03:25 2007 -0700
@@ -17,7 +17,7 @@ void vcpu_flush_tlb_vhpt_range (u64 vadr
 void vcpu_flush_tlb_vhpt_range (u64 vadr, u64 log_range);
 
 /* Global all flush of vTLB  */
-void domain_flush_vtlb_all (void);
+void domain_flush_vtlb_all(struct domain *d);
 
 /* Global range-flush of vTLB.  */
 void domain_flush_vtlb_range (struct domain *d, u64 vadr, u64 addr_range);

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [IA64] fix domain_flush_vtlb_all(), Xen patchbot-unstable <=