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 ptc.ga emulation bug

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [IA64] Fix ptc.ga emulation bug
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 23 Mar 2007 05:30:12 -0700
Delivery-date: Fri, 23 Mar 2007 05:29:38 -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@xxxxxxxxxxxx
# Date 1172683124 25200
# Node ID 21d0d23a2ccac06d4325afc702373f40168ca4be
# Parent  ac28d6c41e6f7a1c4ce7ea8b65c87c2008f9ea4f
[IA64] Fix ptc.ga emulation bug

If a vcpu migrates to the local cpu, smp_call_function_single() doesn't
work.  Call ptc_ga_remote_func() directly instead.

Signed-off-by: Anthony Xu <anthony.xu@xxxxxxxxx>
---
 xen/arch/ia64/vmx/vmmu.c |   24 +++++++++++++-----------
 1 files changed, 13 insertions(+), 11 deletions(-)

diff -r ac28d6c41e6f -r 21d0d23a2cca xen/arch/ia64/vmx/vmmu.c
--- a/xen/arch/ia64/vmx/vmmu.c  Wed Feb 28 09:43:09 2007 -0700
+++ b/xen/arch/ia64/vmx/vmmu.c  Wed Feb 28 10:18:44 2007 -0700
@@ -590,6 +590,7 @@ IA64FAULT vmx_vcpu_ptc_ga(VCPU *vcpu, u6
     struct domain *d = vcpu->domain;
     struct vcpu *v;
     struct ptc_ga_args args;
+    int proc;
 
     args.vadr = va;
     vcpu_get_rr(vcpu, va, &args.rid);
@@ -599,20 +600,21 @@ IA64FAULT vmx_vcpu_ptc_ga(VCPU *vcpu, u6
             continue;
 
         args.vcpu = v;
-        if (v->processor != vcpu->processor) {
-            int proc;
+again: /* Try again if VCPU has migrated.  */
+        proc = v->processor;
+        if (proc != vcpu->processor) {
             /* Flush VHPT on remote processors.  */
-            do {
-                proc = v->processor;
-                smp_call_function_single(v->processor, 
-                    &ptc_ga_remote_func, &args, 0, 1);
-                /* Try again if VCPU has migrated.  */
-            } while (proc != v->processor);
-        }
-        else if(v == vcpu)
+            smp_call_function_single(v->processor,
+                                     &ptc_ga_remote_func, &args, 0, 1);
+            if (proc != v->processor)
+                goto again;
+        } else if (v == vcpu) {
             vmx_vcpu_ptc_l(v, va, ps);
-        else
+        } else {
             ptc_ga_remote_func(&args);
+            if (proc != v->processor)
+                goto again;
+        }
     }
     return IA64_NO_FAULT;
 }

_______________________________________________
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 ptc.ga emulation bug, Xen patchbot-unstable <=