|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [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,
¤t->vcpu_info->evtchn_pending_sel);
+ udelay(10000); /* add udelay to open up the race condition */
clear_bit(0, ¤t->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 <=
|
|
|
|
|