Fabrice Bellard wrote: > Can you move the restorer patch in osdep.c:qemu_sigaction() ? I see no > reason to do it in vl.c. Moreover, you should do it only for "qemu-fast". The attached patch moves the changes out of vl.c and into osdep.c. But the easiest and clearest code requires removing the 'const' attribute for the new struct qemu_sigaction *. This is OK because the only callers are internal, and use temporary struct qemu_sigaction anyway. To insist on keeping the 'const' requires qemu_sigaction to perform a copy before making the modifications for SA_RESTORER and .sa_restorer, and to pass a pointer to the copy as the argument to the syscall. If you want that, then just copy the implementation out of glibc-2.3. It seems to me that the restorer actions must apply to all qemu_sigaction for Linux 2.6.x. If restricted to qemu-fast only, then only qemu-fast will work correctly; the other cases will get SIGSEGV upon return from the corresponding signal handlers. Why should qemu-fast be a special case? --