From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: suspending execution within Xen Date: Wed, 29 Jun 2005 16:49:20 +0300 Message-ID: <1120052961.12491.11.camel@blast.q> References: <1120045998.12491.10.camel@blast.q> <2b16fd68e7b025242a843b31ba8e0701@cl.cam.ac.uk> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <2b16fd68e7b025242a843b31ba8e0701@cl.cam.ac.uk> 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 List-Id: xen-devel@lists.xenproject.org On Wed, 2005-06-29 at 13:42 +0100, Keir Fraser wrote: > Xen on x86 doesn't support stack-based continuations within the > hypervisor -- that is, there is no way to deschedule the current domain > within Xen and then automatically return to your current point of > execution when you are re-scheduled. > > If you have further work to do, before returning to guest context, when > the domain is rescheduled then you need to install your own hook > function into vcpu->arch.schedule_tail. You'll need to xmalloc any > space you need for continuation data. > this will probably serve. thanks. > -- Keir > > On 29 Jun 2005, at 12:53, Avi Kivity wrote: > > > I am trying to send a stream of events about one domain to another. so > > I > > set up a ring between the monitoring domain and xen (not the monitored > > domain). however I am having trouble blocking when buffer space runs > > out. > > > > the intuitive > > > > while (!buffer_space_available()) > > do_block(); > > > > does not work; do_block() appears to return to guest context, not to > > the > > while loop (is this correct?). the other alternative, > > > > while (!buffer_space_available()) > > if (!test_and_set_bit(EDF_BLOCKED, &ed->ed_flags)) > > domain_sleep(ed); > > > > freezes xen solid. > > > > is there a way to do it? am I missing something obvious? > > > > Avi > > > > > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xensource.com > > http://lists.xensource.com/xen-devel >