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-devel

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

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH][3/3] evtchn race condition
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
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH][3/3] evtchn race condition, Woller, Thomas <=