All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][RESEND] vmx-io-events.patch
@ 2005-06-07  0:13 Arun Sharma
  2005-06-07  6:55 ` Keir Fraser
  0 siblings, 1 reply; 2+ messages in thread
From: Arun Sharma @ 2005-06-07  0:13 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>

--- trunk/xen/arch/x86/vmx_io.c	(revision 1179)
+++ trunk/xen/arch/x86/vmx_io.c	(working copy)
@@ -282,7 +282,7 @@
 
     /* Note: VMX domains may need upcalls as well */
     if (!ed->vcpu_info->evtchn_pending_sel) 
-        ed->vcpu_info->evtchn_upcall_pending = 0;
+        clear_bit(0, &ed->vcpu_info->evtchn_upcall_pending);
 
     /* clear the pending bit for IOPACKET_PORT */
     return test_and_clear_bit(IOPACKET_PORT, 
@@ -310,10 +310,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);
 }

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH][RESEND] vmx-io-events.patch
  2005-06-07  0:13 [PATCH][RESEND] vmx-io-events.patch Arun Sharma
@ 2005-06-07  6:55 ` Keir Fraser
  0 siblings, 0 replies; 2+ messages in thread
From: Keir Fraser @ 2005-06-07  6:55 UTC (permalink / raw)
  To: Arun Sharma; +Cc: xen-devel, Ian Pratt


This patch doesn't apply cleanly.

  -- Keir

On 7 Jun 2005, at 01:13, Arun Sharma wrote:

>
> - 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>
>
> --- trunk/xen/arch/x86/vmx_io.c	(revision 1179)
> +++ trunk/xen/arch/x86/vmx_io.c	(working copy)
> @@ -282,7 +282,7 @@
>
>      /* Note: VMX domains may need upcalls as well */
>      if (!ed->vcpu_info->evtchn_pending_sel)
> -        ed->vcpu_info->evtchn_upcall_pending = 0;
> +        clear_bit(0, &ed->vcpu_info->evtchn_upcall_pending);
>
>      /* clear the pending bit for IOPACKET_PORT */
>      return test_and_clear_bit(IOPACKET_PORT,
> @@ -310,10 +310,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);
>  }
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-06-07  6:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-07  0:13 [PATCH][RESEND] vmx-io-events.patch Arun Sharma
2005-06-07  6:55 ` Keir Fraser

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.