From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LfGRo-0008Jp-LF for qemu-devel@nongnu.org; Thu, 05 Mar 2009 11:29:24 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LfGRk-0008IG-Mb for qemu-devel@nongnu.org; Thu, 05 Mar 2009 11:29:24 -0500 Received: from [199.232.76.173] (port=58512 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LfGRk-0008ID-K8 for qemu-devel@nongnu.org; Thu, 05 Mar 2009 11:29:20 -0500 Received: from mx20.gnu.org ([199.232.41.8]:59062) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LfGRk-0006hY-56 for qemu-devel@nongnu.org; Thu, 05 Mar 2009 11:29:20 -0500 Received: from mail.codesourcery.com ([65.74.133.4]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LfGRh-00035f-Nb for qemu-devel@nongnu.org; Thu, 05 Mar 2009 11:29:18 -0500 From: Paul Brook Subject: Re: [Qemu-devel] [PATCH 7/7] PPC64: Don't fault at lwsync Date: Thu, 5 Mar 2009 16:29:13 +0000 References: <1236262454-6293-1-git-send-email-agraf@suse.de> <49AFF663.6020006@suse.de> <49AFF942.6000708@suse.de> In-Reply-To: <49AFF942.6000708@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200903051629.14664.paul@codesourcery.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: blauwirbel@gmail.com, Alexander Graf , qemu-devel@nongnu.org > > 0xc0000000000ba524: lwsync > > 0xc0000000000ba528: lwarx r0,0,r3 > > 0xc0000000000ba52c: cmpw r0,r4 > > 0xc0000000000ba530: bne- 0xc0000000000ba540 > > > > > > And I seriously have trouble understanding how a data storage exception > > could happen on the lwsync opcode. It looks like R3 became 0 from the > > guest's point of view after lwsync though - hum. > > Ah I remember that one now :-). The futex_init function tests if cmpxchg > works with NULL values and that's why R3 is 0. It's actually _supposed_ > to fault here. But something gets messed up when the fault happens on > IP=lwsync instead of IP=lwarx and I haven't really researched into why. That's what you need to fix then :-) I'm pretty sure that terminating the TB after the lwsync is not the correct solution, and is just hiding the real bug. Paul