Subject: Re: port-xen/29999: ctrl_if_interrupt IPL problem
To: None <port-xen-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
List: netbsd-bugs
Date: 04/19/2005 12:39:02
The following reply was made to PR port-xen/29999; it has been noted by GNATS.

From: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
Cc: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>, gnats-bugs@NetBSD.org,
	port-xen-maintainer@NetBSD.org, gnats-admin@NetBSD.org,
	netbsd-bugs@NetBSD.org
Subject: Re: port-xen/29999: ctrl_if_interrupt IPL problem
Date: Tue, 19 Apr 2005 13:38:10 +0100

 On Tue, Apr 19, 2005 at 12:51:17PM +0200, Manuel Bouyer wrote:
 > On Tue, Apr 19, 2005 at 11:43:04AM +0100, Christian Limpach wrote:
 > > From: "Manuel Bouyer" <bouyer@antioche.lip6.fr>
 > > >Hum, I need to look at this again. From what I remember, if I leaved
 > > >the events blocked, HYPERVISOR_yield() would never return.
 > > >But maybe I had something else wrong in my code.
 > > 
 > > HYPERVISOR_yield() should be used to yield the cpu, i.e. other domains will 
 > > get to run and the current domain gets put on the runqueue and will run 
 > > again at some point.  HYPERVISOR_block() will also yield the cpu but only 
 > > returns once there's an event that can be delivered.
 > 
 > Will HYPERVISOR_block() return when there is an event pending, even if
 > evtchn_upcall_mask is nonzero ?
 
 yes, HYPERVISOR_block() will reenable events in a race-free manner, i.e.
 you want to call HYPERVISOR_block() with events disabled and it will return
 immediately if there are already pending events.
 
     christian