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

[Xen-devel] [PATCH][3/3] evtchn race condition


  • To: xen-devel@xxxxxxxxxxxxxxxxxxx
  • From: "Woller, Thomas" <thomas.woller@xxxxxxx>
  • Date: Wed, 25 Jan 2006 09:12:00 -0600
  • Delivery-date: Wed, 25 Jan 2006 15:22:34 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AcYhwbCIU5xwbNZTTl65ayGTCKLwPg==
  • Thread-topic: [PATCH][3/3] evtchn race condition

This patch is for testing only, and adds delay logic to allow
reproduction of the evtchn guest  hang problem.  Applies to the
xen-unstable-hvm.hg repository.


Signed-off-by: Tom Woller <thomas.woller@xxxxxxx>

diff -r 44b96aafa499 xen/arch/x86/hvm/io.c
--- a/xen/arch/x86/hvm/io.c     Tue Jan 24 18:36:58 2006
+++ b/xen/arch/x86/hvm/io.c     Tue Jan 24 16:11:46 2006
@@ -37,6 +37,7 @@
 #include <asm/hvm/vpit.h>
 #include <asm/hvm/vpic.h>
 #include <asm/hvm/vlapic.h>
+#include <asm/delay.h>
 
 #include <public/hvm/ioreq.h>
 
@@ -695,11 +696,17 @@
 
     /* evtchn_pending_sel bit is shared by other event channels. */
     if (!d->shared_info->evtchn_pending[port/BITS_PER_LONG])
+    {
+        udelay(10000);  /* add udelay to open up the race condition */
         clear_bit(port/BITS_PER_LONG,
&v->vcpu_info->evtchn_pending_sel);
+    }
 
     /* Note: HVM domains may need upcalls as well. */
     if (!v->vcpu_info->evtchn_pending_sel)
+    {
+        udelay(10000);  /* add udelay to open up the race condition */
         clear_bit(0, &v->vcpu_info->evtchn_upcall_pending);
+    }
 
     /* Clear the pending bit for port. */
     return test_and_clear_bit(port,
&d->shared_info->evtchn_pending[0]);
@@ -743,6 +750,7 @@
         * In that case, safely go back to sleep.
         */
         clear_bit(port/BITS_PER_LONG,
&current->vcpu_info->evtchn_pending_sel);
+        udelay(10000);  /* add udelay to open up the race condition */
         clear_bit(0, &current->vcpu_info->evtchn_upcall_pending);
     } while(1);
 }


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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.