[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/2] coroutine: introduce coroutines
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH 1/2] coroutine: introduce coroutines |
Date: |
Wed, 11 May 2011 14:15:22 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101027 Fedora/3.0.10-1.fc12 Thunderbird/3.0.10 |
Am 11.05.2011 14:04, schrieb Paolo Bonzini:
> 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 <address@hidden>
Yeah, I didn't feel like searching for the right APIs, but wanted to
have something that builds for win32 at least. And this one seemed to
work for some simple tests in Wine.
So my plan with it was to CC Stefan Weil and have him provide the real
implementation that works on 64 bit, too. ;-)
Kevin
- [Qemu-devel] [PATCH 0/2] Coroutines for better asynchronous programming, Stefan Hajnoczi, 2011/05/11
- [Qemu-devel] [PATCH 2/2] coroutine: add check-coroutine automated tests, Stefan Hajnoczi, 2011/05/11
- [Qemu-devel] [PATCH 1/2] coroutine: introduce coroutines, Stefan Hajnoczi, 2011/05/11
- Re: [Qemu-devel] [PATCH 1/2] coroutine: introduce coroutines, Kevin Wolf, 2011/05/11
- Re: [Qemu-devel] [PATCH 1/2] coroutine: introduce coroutines, Paolo Bonzini, 2011/05/11
- Re: [Qemu-devel] [PATCH 1/2] coroutine: introduce coroutines,
Kevin Wolf <=
- Re: [Qemu-devel] [PATCH 1/2] coroutine: introduce coroutines, Anthony Liguori, 2011/05/11
- Re: [Qemu-devel] [PATCH 1/2] coroutine: introduce coroutines, Paolo Bonzini, 2011/05/11
- Re: [Qemu-devel] [PATCH 1/2] coroutine: introduce coroutines, Anthony Liguori, 2011/05/11
- Re: [Qemu-devel] [PATCH 1/2] coroutine: introduce coroutines, Paolo Bonzini, 2011/05/11
- Re: [Qemu-devel] [PATCH 1/2] coroutine: introduce coroutines, Daniel P. Berrange, 2011/05/11
- Re: [Qemu-devel] [PATCH 1/2] coroutine: introduce coroutines, Jamie Lokier, 2011/05/24
- Re: [Qemu-devel] [PATCH 1/2] coroutine: introduce coroutines, Stefan Hajnoczi, 2011/05/24
- Re: [Qemu-devel] [PATCH 1/2] coroutine: introduce coroutines, Jamie Lokier, 2011/05/24
- Re: [Qemu-devel] [PATCH 1/2] coroutine: introduce coroutines, Stefan Hajnoczi, 2011/05/25
- Re: [Qemu-devel] [PATCH 1/2] coroutine: introduce coroutines, Richard Henderson, 2011/05/25