From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:40331) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QK8A1-00078Z-96 for qemu-devel@nongnu.org; Wed, 11 May 2011 08:05:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QK89x-0002ug-Dn for qemu-devel@nongnu.org; Wed, 11 May 2011 08:05:01 -0400 Received: from mail-bw0-f45.google.com ([209.85.214.45]:40115) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QK89x-0002uS-5L for qemu-devel@nongnu.org; Wed, 11 May 2011 08:04:57 -0400 Received: by bwz16 with SMTP id 16so394743bwz.4 for ; Wed, 11 May 2011 05:04:56 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <4DCA7B64.7000900@redhat.com> Date: Wed, 11 May 2011 14:04:52 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1305108925-26048-1-git-send-email-stefanha@linux.vnet.ibm.com> <1305108925-26048-2-git-send-email-stefanha@linux.vnet.ibm.com> In-Reply-To: <1305108925-26048-2-git-send-email-stefanha@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/2] coroutine: introduce coroutines List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Kevin Wolf , Anthony Liguori , Venkateswararao Jujjuri , qemu-devel@nongnu.org On 05/11/2011 12:15 PM, Stefan Hajnoczi wrote: > +#ifdef __i386__ > + asm volatile( > + "mov %%esp, %%ebx;" > + "mov %0, %%esp;" > + "pushl %1;" > + "call _trampoline;" > + "mov %%ebx, %%esp;" > + : : "r" (co->stack + co->stack_size), "r" (co) : "ebx" > + ); This is incomplete, it should set FS:[4] and FS:[8] to top and bottom of stack respectively, otherwise exception handling (including SIGSEGV) is broken. But I think for Windows it's anyway better to use fibers. Commit this and either I or Stefan Weil will fix it. :) Acked-by: Paolo Bonzini Paolo