From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ETXQX-0007l6-5x for qemu-devel@nongnu.org; Sun, 23 Oct 2005 00:25:45 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ETXQV-0007ku-G8 for qemu-devel@nongnu.org; Sun, 23 Oct 2005 00:25:44 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ETXQV-0007kr-CH for qemu-devel@nongnu.org; Sun, 23 Oct 2005 00:25:43 -0400 Received: from [66.54.152.27] (helo=jive.SoftHome.net) by monty-python.gnu.org with smtp (Exim 4.34) id 1ETXQV-0002tp-FE for qemu-devel@nongnu.org; Sun, 23 Oct 2005 00:25:43 -0400 From: Mulyadi Santosa Subject: Re: [Qemu-devel] Re: qemu-ppc fails to run clone with CLONE_VM, threaded programs, non-static programs Date: Sun, 23 Oct 2005 11:21:20 +0700 References: <43599151.90802@psas.pdx.edu> <4359E22A.2090904@psas.pdx.edu> In-Reply-To: <4359E22A.2090904@psas.pdx.edu> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200510231121.20448.a_mulyadi@softhome.net> Reply-To: a_mulyadi@softhome.net, 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, Josh Triplett Hello... > I worked with pbrook on #qemu to debug this issue. The problem turns > out to be that qemu's do_fork function on PowerPC zeroes out r7-r31 > in the new CPU state structure after a clone, which it should not do, Josh....at least it proves (to me) that the parameters passed to the clone() is correct. About the registers....well, this is completely new for me. I wonder, what is the function of those registers (r7-r31)? Something related with the segments? > as the child's registers should match the parent; it also does not > zero register r3, which holds the return value and should be zero in > the child. I've prepared and attached a patch which should solve > this problem. Nice...this is something we surely forgot from out last attempt to debug the problem....return value. I was too focused on checking every memory accesses were done inside process address space and function address translation were done correctly :) Anyway, just a personal suggestion. You can put that patch to qemu.dad-answers.com along with the description on how you found the bug and what this patch does. regards Mulyadi