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

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [IA64] Fix ptc.ga emulation
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 13 Apr 2007 10:50:35 -0700
Delivery-date: Fri, 13 Apr 2007 11:22:45 -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 Alex Williamson <alex.williamson@xxxxxx>
# Date 1176474801 21600
# Node ID c42ae7839750d685e0330f76351af8b02deabadc
# Parent  41471cc650a2380876a9bff2610297ffacf2c83d
[IA64] Fix ptc.ga emulation

ptc.ga infrequently clobbers the region register 0.

When vcpu1 purges TLBs of vcpu2 and ptc_ga_remote_func() is called
locally not via IPI (i.e. vcpu1 shares the same pcpu with vcpu2),
in ptc_ga_remote_func(),

  save vrr[0] of vcpu2
  ... => switch to vcpu2 and set a new value of vrr[0]
  restore vrr[0] of vcpu2 // the new value is lost

Windows will crash due to this issue.

Signed-off-by: Kouya Shimura <kouya@xxxxxxxxxxxxxx>
---
 xen/arch/ia64/vmx/vmmu.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff -r 41471cc650a2 -r c42ae7839750 xen/arch/ia64/vmx/vmmu.c
--- a/xen/arch/ia64/vmx/vmmu.c  Thu Apr 12 10:30:12 2007 -0600
+++ b/xen/arch/ia64/vmx/vmmu.c  Fri Apr 13 08:33:21 2007 -0600
@@ -34,6 +34,7 @@
 #include <asm/vcpu.h>
 #include <xen/irq.h>
 #include <xen/errno.h>
+#include <xen/sched-if.h>
 
 /*
  * Get the machine page frame number in 16KB unit
@@ -613,8 +614,14 @@ again: /* Try again if VCPU has migrated
         } else if (v == vcpu) {
             vmx_vcpu_ptc_l(v, va, ps);
         } else {
-            ptc_ga_remote_func(&args);
-            if (proc != v->processor)
+            vcpu_schedule_lock_irq(v);
+            proc = v->processor;
+            if (proc == vcpu->processor)
+                ptc_ga_remote_func(&args);
+            else
+                proc = INVALID_PROCESSOR;
+            vcpu_schedule_unlock_irq(v);
+            if (proc == INVALID_PROCESSOR)
                 goto again;
         }
     }

_______________________________________________
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, Xen patchbot-unstable <=