* [PATCH][RESEND2] vmx-io-events.patch
@ 2005-06-07 18:21 Arun Sharma
0 siblings, 0 replies; only message in thread
From: Arun Sharma @ 2005-06-07 18:21 UTC (permalink / raw)
To: Ian Pratt, Keir Fraser; +Cc: xen-devel
- Handle the case where the VMX domains get events from ports other than
IOPACKET_PORT (because of paravirtualized drivers)
- Use clear_bit() to operate on evtchn_upcall_pending
Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
Signed-off-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Arun Sharma <arun.sharma@intel.com>
--- a/xen/arch/x86/vmx_io.c Tue Jun 7 17:57:58 2005
+++ b/xen/arch/x86/vmx_io.c Tue Jun 7 11:19:38 2005
@@ -283,7 +283,7 @@
/* Note: VMX domains may need upcalls as well */
if (!v->vcpu_info->evtchn_pending_sel)
- v->vcpu_info->evtchn_upcall_pending = 0;
+ clear_bit(0, &v->vcpu_info->evtchn_upcall_pending);
/* clear the pending bit for IOPACKET_PORT */
return test_and_clear_bit(IOPACKET_PORT,
@@ -311,10 +311,16 @@
extern void do_block();
do {
- do_block();
+ if(!test_bit(IOPACKET_PORT,
+ ¤t->domain->shared_info->evtchn_pending[0]))
+ do_block();
vmx_check_events(current);
if (!test_bit(ARCH_VMX_IO_WAIT, ¤t->arch.arch_vmx.flags))
break;
+ /* Events other than IOPACKET_PORT might have woken us up. In that
+ case, safely go back to sleep. */
+ clear_bit(IOPACKET_PORT>>5, ¤t->vcpu_info->evtchn_pending_sel);
+ clear_bit(0, ¤t->vcpu_info->evtchn_upcall_pending);
} while(1);
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-06-07 18:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-07 18:21 [PATCH][RESEND2] vmx-io-events.patch Arun Sharma
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.