From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1C2ePQ-0003HI-Gb for qemu-devel@nongnu.org; Wed, 01 Sep 2004 19:20:56 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1C2ePO-0003Gl-Fv for qemu-devel@nongnu.org; Wed, 01 Sep 2004 19:20:55 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C2ePM-0003Ga-B1 for qemu-devel@nongnu.org; Wed, 01 Sep 2004 19:20:53 -0400 Received: from [143.106.7.31] (helo=maceio.ic.unicamp.br) by monty-python.gnu.org with esmtp (Exim 4.34) id 1C2eJf-0003vv-1D for qemu-devel@nongnu.org; Wed, 01 Sep 2004 19:14:59 -0400 Received: from brasilia.ic.unicamp.br (brasilia.ic.unicamp.br [143.106.7.34]) by maceio.ic.unicamp.br (8.11.6/8.11.6) with ESMTP id i81NEqr01300 for ; Wed, 1 Sep 2004 20:14:52 -0300 Received: from localhost (localhost [127.0.0.1]) by brasilia.ic.unicamp.br (Postfix) with ESMTP id 1280310D623 for ; Wed, 1 Sep 2004 20:14:52 -0300 (BRT) Received: from brasilia.ic.unicamp.br ([127.0.0.1]) by localhost (brasilia.ic.unicamp.br [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 28548-03 for ; Wed, 1 Sep 2004 20:14:51 -0300 (BRT) Received: from ltc02.ltc.ic.unicamp.br (tux02.ltc.ic.unicamp.br [143.106.24.32]) by brasilia.ic.unicamp.br (Postfix) with ESMTP id B1BF110D61E for ; Wed, 1 Sep 2004 20:14:51 -0300 (BRT) From: Rafael =?iso-8859-1?q?=C1vila_de_Esp=EDndola?= Subject: Re: [Qemu-devel] USE_CODE_COPY breaks clone Date: Wed, 1 Sep 2004 20:17:21 -0300 References: <200409011432.40742.rafael.espindola@ic.unicamp.br> In-Reply-To: <200409011432.40742.rafael.espindola@ic.unicamp.br> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200409012017.21889.rafael.espindola@ic.unicamp.br> 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 On Wednesday 01 September 2004 14:32, Rafael =C1vila de Esp=EDndola wrote: > I think that the problem is in the fact that cpu_init is called in the > parent process and this functions calls modify_ldt. > > Where can I found some documentation about modify_ldt? What is > USE_CODE_COPY supposed to do? Ok. It translate i386 to i386 code by copying it. > I will try to call cpu_init from within the new thread and see if it work= s. No it doesn't. If clone is called with CLONE_VM then the kernel does =20 mm =3D oldmm; and both processes share the ldt. So the parent ldt is "also" changed when= =20 cpu_init is called from clone_func. I could not find out why it is necessary to modify the ltd of the process f= or=20 code copy to work. Is there some documentation? Could someone explain? Does someone have an Idea of how to solve this? Thanks, Rafael