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

[Xen-changelog] [PATCH] vmx-io-events.patch

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [PATCH] vmx-io-events.patch
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Wed, 08 Jun 2005 08:40:39 +0000
Delivery-date: Wed, 08 Jun 2005 10:02:15 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: Xen Development List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
ChangeSet 1.1695, 2005/06/08 09:40:39+01:00, arun.sharma@xxxxxxxxx

        [PATCH] vmx-io-events.patch
        
        - 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>



 vmx_io.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)


diff -Nru a/xen/arch/x86/vmx_io.c b/xen/arch/x86/vmx_io.c
--- a/xen/arch/x86/vmx_io.c     2005-06-08 06:03:12 -04:00
+++ b/xen/arch/x86/vmx_io.c     2005-06-08 06:03:12 -04:00
@@ -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();
         vmx_check_events(current);
         if (!test_bit(ARCH_VMX_IO_WAIT, &current->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, &current->vcpu_info->evtchn_pending_sel);
+        clear_bit(0, &current->vcpu_info->evtchn_upcall_pending);
     } while(1);
 }
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [PATCH] vmx-io-events.patch, BitKeeper Bot <=