Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N68xo-0004wX-2K for qemu-devel@nongnu.org; Thu, 05 Nov 2009 15:29:48 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N68xj-0004uL-4b for qemu-devel@nongnu.org; Thu, 05 Nov 2009 15:29:47 -0500 Received: from [199.232.76.173] (port=46716 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N68xj-0004uG-0f for qemu-devel@nongnu.org; Thu, 05 Nov 2009 15:29:43 -0500 Received: from mail-01.cse.ucsc.edu ([128.114.48.32]:54245) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N68xi-0007gx-Hg for qemu-devel@nongnu.org; Thu, 05 Nov 2009 15:29:42 -0500 Date: Thu, 5 Nov 2009 12:29:39 -0800 (PST) From: David Munday Message-ID: <2142692010.2491561257452979574.JavaMail.root@mail-01.cse.ucsc.edu> In-Reply-To: <1010833181.2491521257452944973.JavaMail.root@mail-01.cse.ucsc.edu> Subject: Re: [Qemu-devel] SPARC user mode multithread MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: qemu-devel@nongnu.org Hi, I found the Linux/Sparc clone operations in copy_thread() from process32.c (attached) I tried modifying cpu_clone_regs with the following code per the Sparc/linux 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 something. Is there more to this fix than these two assignments? static inline void cpu_clone_regs(CPUState *PARENT_env, CPUState *child_env, target_ulong newsp) { if (newsp) { child_env->regwptr[14] = newsp; //changed to 14 per process32.c DM //env->regwptr[22] = newsp; printf("setting stack pointer\n"); } child_env->regwptr[0] = 0; child_env->regwptr[1] = 1; //added per process32.c in kernel for sparc parent_env->regwptr[1] = 0; //make parent return value = 0 per process32.c in kernel for sparc} } Thanks, David ----- Original Message ----- From: "Blue Swirl" To: "David Munday" Cc: qemu-devel@nongnu.org Sent: Tuesday, November 3, 2009 12:41:04 PM GMT -08:00 US/Canada Pacific Subject: Re: [Qemu-devel] SPARC user mode multithread On Tue, Nov 3, 2009 at 10:03 PM, David Munday wrote: > Hello, > I am trying to run the blackscholes program from the PARSEC2.1 benchmark suite in QEMU SPARC user mode. > In this case I am trying to run with just 2 threads. Unfortunately, when I try to run the program it hangs with the following prints: > > HELPME: /mada/users/cromom/ESESC_PROJECT/esesc/emul/qemu1/target-sparc/cpu.h:516 > HELPME: /mada/users/cromom/ESESC_PROJECT/esesc/emul/qemu1/target-sparc/cpu.h:516 It means that someone should figure out what Linux/Sparc does to registers, register windows and processor flags when doing "clone". The fix should be trivial.