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/
Home Products Support Community News


[Xen-devel] [PATCH][RESEND2] vmx-io-events.patch

To: Ian Pratt <Ian.Pratt@xxxxxxxxxxxx>, Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH][RESEND2] vmx-io-events.patch
From: Arun Sharma <arun.sharma@xxxxxxxxx>
Date: Tue, 7 Jun 2005 11:21:03 -0700
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 07 Jun 2005 18:17:43 +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
User-agent: Mutt/1.4.1i
- 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@xxxxxxxxx>
Signed-off-by: Kevin Tian <kevin.tian@xxxxxxxxx>
Signed-off-by: Arun Sharma <arun.sharma@xxxxxxxxx>

--- 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, 
+            &current->domain->shared_info->evtchn_pending[0]))
+            do_block();
         if (!test_bit(ARCH_VMX_IO_WAIT, &current->arch.arch_vmx.flags))
+        /* Events other than IOPACKET_PORT might have woken us up. In that
+           case, safely go back to sleep. */
+        clear_bit(IOPACKET_PORT>>5, &current->vcpu_info->evtchn_pending_sel);
+        clear_bit(0, &current->vcpu_info->evtchn_upcall_pending);
     } while(1);

Xen-devel mailing list

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH][RESEND2] vmx-io-events.patch, Arun Sharma <=