All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] minios: fix and enforce block_domain atomicity
@ 2008-05-08 10:56 Samuel Thibault
  0 siblings, 0 replies; only message in thread
From: Samuel Thibault @ 2008-05-08 10:56 UTC (permalink / raw)
  To: xen-devel

minios: fix and enforce block_domain atomicity

To ensure that the timer event is not lost, block_domain requires that
event delivery is disabled.  SCHEDOP_block re-enables them, so for
coherency (and fixing a bug actually), we should re-disable them after.
Also, make sure that the caller disabled them.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>

diff -r 4965e711fee8 extras/mini-os/arch/x86/time.c
--- a/extras/mini-os/arch/x86/time.c	Wed May 07 15:36:32 2008 +0100
+++ b/extras/mini-os/arch/x86/time.c	Thu May 08 11:40:05 2008 +0100
@@ -201,10 +201,12 @@ void block_domain(s_time_t until)
 {
     struct timeval tv;
     gettimeofday(&tv, NULL);
+    ASSERT(irqs_disabled());
     if(monotonic_clock() < until)
     {
         HYPERVISOR_set_timer_op(until);
         HYPERVISOR_sched_op(SCHEDOP_block, 0);
+        local_irq_disable();
     }
 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-05-08 10:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-08 10:56 [PATCH] minios: fix and enforce block_domain atomicity Samuel Thibault

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.