From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CgAAb-0004Xt-0N for qemu-devel@nongnu.org; Sun, 19 Dec 2004 18:08:57 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CgAAa-0004XU-5q for qemu-devel@nongnu.org; Sun, 19 Dec 2004 18:08:56 -0500 Received: from [129.104.30.34] (helo=mx1.polytechnique.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Cg9p4-0003zF-Tb for qemu-devel@nongnu.org; Sun, 19 Dec 2004 17:46:43 -0500 Received: from localhost (localhost [127.0.0.1]) by djali.polytechnique.org (Postfix) with ESMTP id 2E76F331AF for ; Sun, 19 Dec 2004 23:46:41 +0100 (CET) Received: from djali.polytechnique.org ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 18887-05 for ; Sun, 19 Dec 2004 23:46:41 +0100 (CET) Received: from [84.99.204.141] (unknown [84.99.204.141]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ssl.polytechnique.org (Postfix) with ESMTP id C5379331BF for ; Sun, 19 Dec 2004 23:46:40 +0100 (CET) Message-ID: <41C604F0.30601@bellard.org> Date: Sun, 19 Dec 2004 23:47:12 +0100 From: Fabrice Bellard MIME-Version: 1.0 Subject: Re: [Qemu-devel] qemu on Fedora Core 3 (Linux 2.6.9+), glibc-2.3.3 References: <41C50D64.7070209@BitWagon.com> <41e41e7a04121902033c7a42ee@mail.gmail.com> <41C58841.4060008@BitWagon.com> In-Reply-To: <41C58841.4060008@BitWagon.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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". Fabrice. John Reiser wrote: >> Could you please re-send your patch, diffed, as an attachment please? > > > The important part of the original post was output from "diff -Naur". > Does gmail mangle message bodies, or was the request due to the > other small manual adjustments (non-patch) noted in the original post? > Anyway, a 100% patch is attached for use by "patch -p1". > > > ------------------------------------------------------------------------ > > --- ./vl.c.orig 2004-12-12 14:20:04.000000000 -0800 > +++ ./vl.c 2004-12-19 05:49:53.323570312 -0800 > @@ -882,6 +882,9 @@ > > #endif /* !defined(_WIN32) */ > > +extern void __restore(void); > +extern void __restore_rt(void); > + > static void init_timers(void) > { > rt_clock = qemu_new_clock(QEMU_TIMER_REALTIME); > @@ -913,7 +916,9 @@ > sigfillset(&act.sa_mask); > act.sa_flags = 0; > #if defined (TARGET_I386) && defined(USE_CODE_COPY) > - act.sa_flags |= SA_ONSTACK; > +#define SA_RESTORER 0x04000000 > + act.sa_flags |= SA_ONSTACK | SA_RESTORER; > + act.sa_restorer = __restore; > #endif > act.sa_handler = host_alarm_handler; > sigaction(SIGALRM, &act, NULL); > @@ -3402,7 +3407,8 @@ > sigfillset(&act.sa_mask); > act.sa_flags = SA_SIGINFO; > #if defined (TARGET_I386) && defined(USE_CODE_COPY) > - act.sa_flags |= SA_ONSTACK; > + act.sa_flags |= SA_ONSTACK | SA_RESTORER; > + act.sa_restorer = __restore_rt; > #endif > act.sa_sigaction = host_segv_handler; > sigaction(SIGSEGV, &act, NULL); > @@ -3449,6 +3455,7 @@ > exit(1); > } else { > printf("Waiting gdb connection on port %d\n", gdbstub_port); > +sleep(5); > } > } else > #endif > --- ./Makefile.target.orig 2004-12-12 08:56:30.000000000 -0800 > +++ ./Makefile.target 2004-12-19 05:48:08.201551288 -0800 > @@ -264,7 +264,7 @@ > endif > > # must use static linking to avoid leaving stuff in virtual address space > -VL_OBJS=vl.o osdep.o block.o readline.o monitor.o pci.o console.o > +VL_OBJS=vl.o osdep.o block.o readline.o monitor.o pci.o console.o __restore.o > VL_OBJS+=block-cow.o block-qcow.o aes.o block-vmdk.o block-cloop.o block-dmg.o > > SOUND_HW = sb16.o > --- ./__restore.S.orig 2004-12-19 05:44:53.832099936 -0800 > +++ ./__restore.S 2004-12-18 20:34:14.000000000 -0800 > @@ -0,0 +1,10 @@ > +#include > + > +__restore: .globl __restore > + pop %eax > + movl $ __NR_sigreturn,%eax > + int $0x80 > + > +__restore_rt: .globl __restore_rt > + movl $ __NR_rt_sigreturn,%eax > + int $0x80 > > > ------------------------------------------------------------------------ > > _______________________________________________ > Qemu-devel mailing list > Qemu-devel@nongnu.org > http://lists.nongnu.org/mailman/listinfo/qemu-devel