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 <pbonz...@redhat.com>

Paolo

Reply via email to