Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N6TbD-0006oH-4F for qemu-devel@nongnu.org; Fri, 06 Nov 2009 13:31:51 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N6Tb8-0006iI-Tz for qemu-devel@nongnu.org; Fri, 06 Nov 2009 13:31:50 -0500 Received: from [199.232.76.173] (port=46246 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N6Tb8-0006hm-MG for qemu-devel@nongnu.org; Fri, 06 Nov 2009 13:31:46 -0500 Received: from mail-yw0-f176.google.com ([209.85.211.176]:43929) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N6Tb8-0002aH-60 for qemu-devel@nongnu.org; Fri, 06 Nov 2009 13:31:46 -0500 Received: by ywh6 with SMTP id 6so1125991ywh.4 for ; Fri, 06 Nov 2009 10:31:45 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <2142692010.2491561257452979574.JavaMail.root@mail-01.cse.ucsc.edu> References: <1010833181.2491521257452944973.JavaMail.root@mail-01.cse.ucsc.edu> <2142692010.2491561257452979574.JavaMail.root@mail-01.cse.ucsc.edu> From: Blue Swirl Date: Fri, 6 Nov 2009 20:31:23 +0200 Message-ID: Subject: Re: [Qemu-devel] SPARC user mode multithread Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Munday Cc: qemu-devel@nongnu.org On Thu, Nov 5, 2009 at 10:29 PM, David Munday wrote: > Hi, > I found the Linux/Sparc clone operations in copy_thread() from process32.= c (attached) Forgot to attach? > I tried modifying cpu_clone_regs with the following code per the Sparc/li= nux routines, but qemu still stalls on signal suspend. > > It seems like it should only need to set the stack pointer and the return= addresses for the child and parent processes, but it's clearly missing som= ething. > > Is there more to this fix than these two assignments? > > static inline void cpu_clone_regs(CPUState *PARENT_env, CPUState *child_e= nv, target_ulong newsp) > { > =C2=A0 =C2=A0if (newsp) > =C2=A0 =C2=A0{ > =C2=A0 =C2=A0 child_env->regwptr[14] =3D newsp; //changed to 14 per proce= ss32.c DM > =C2=A0 =C2=A0 =C2=A0 =C2=A0 //env->regwptr[22] =3D newsp; But 14 would be l6, not i6. > =C2=A0 =C2=A0 printf("setting stack pointer\n"); > =C2=A0 =C2=A0} > =C2=A0 =C2=A0child_env->regwptr[0] =3D 0; This should be the pid.