From: Shu Wu Subject: Re: At what places is an event handler called besides a hypercall? Date: Fri, 23 Oct 2009 09:55:09 +0800 Message-ID: <5c7d4fb80910221855i2fe19de6sb3a32dafd86c500c@mail.gmail.com> References: <5c7d4fb80910220034x50a0801bq99db21ede74a349a@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1297304501==" Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org --===============1297304501== Content-Type: multipart/alternative; boundary=000e0cd6684e757f5d04769080a4 --000e0cd6684e757f5d04769080a4 Content-Type: text/plain; charset=ISO-8859-1 Yeah, I see it! Especially in the exception handler there is a call to test_all_events, which checks the event and calls the handler. All these will happen frequently. Thanks a lot! 2009/10/22 Keir Fraser > On 22/10/2009 08:34, "Shu Wu" wrote: > > > Hi, folks. I'm puzzled when the event handler is called in xen. I've only > > found a pending check and an upcall at the end of each hypercall. And an > event > > delivery will cause a schedule, but no calling to the handler. So it > seems > > when a domain sends a event to the other, the handler of that domain > won't be > > called until it makes a hypercall or check it itself. That sounds not so > > reasonable. Could anyone tell me the truth? Thanks! > > Events are checked for on any return to guest context. If the event sender > sees the receiver is running on another CPU, it sends an IPI, and on return > to guest context from that IPI the receiving CPU will deliver the event to > the receiving guest. > > -- Keir > > > --000e0cd6684e757f5d04769080a4 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Yeah, I see it! Especially in the exception handler there is a call to test= _all_events, which checks the event and calls the handler. All these will h= appen frequently. Thanks a lot!

2009/10/2= 2 Keir Fraser <keir.fraser@eu.citrix.com>
<= div class=3D"h5">On 22/10/2009 08:34, "Shu Wu" <superwushu@gmail.com> wrote:

> Hi, folks. I'm puzzled when the event handler is called in xen. I&= #39;ve only
> found a pending check and an upcall at the end of each hypercall. And = an event
> delivery will cause a schedule, but no calling to the handler. So it s= eems
> when a domain sends a event to the other, the handler of that domain w= on't be
> called until it makes a hypercall or check it itself. That sounds not = so
> reasonable. Could anyone tell me the truth? Thanks!

Events are checked for on any return to guest context. If the e= vent sender
sees the receiver is running on another CPU, it sends an IPI, and on return=
to guest context from that IPI the receiving CPU will deliver the event to<= br> the receiving guest.

=A0-- Keir



--000e0cd6684e757f5d04769080a4-- --===============1297304501== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============1297304501==--