From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LfL0v-0003FL-JA for qemu-devel@nongnu.org; Thu, 05 Mar 2009 16:21:57 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LfL0u-0003F9-8m for qemu-devel@nongnu.org; Thu, 05 Mar 2009 16:21:57 -0500 Received: from [199.232.76.173] (port=43451 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LfL0u-0003F6-6b for qemu-devel@nongnu.org; Thu, 05 Mar 2009 16:21:56 -0500 Received: from kassel160.server4you.de ([62.75.246.160]:53649 helo=csgraf.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LfL0t-0003rZ-Qu for qemu-devel@nongnu.org; Thu, 05 Mar 2009 16:21:56 -0500 Message-ID: <49B0426E.9050607@csgraf.de> Date: Thu, 05 Mar 2009 22:21:50 +0100 From: Alexander Graf MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 7/7] PPC64: Don't fault at lwsync References: <1236262454-6293-1-git-send-email-agraf@suse.de> <1236262454-6293-7-git-send-email-agraf@suse.de> <1236262454-6293-8-git-send-email-agraf@suse.de> <200903051644.30883.paul@codesourcery.com> In-Reply-To: <200903051644.30883.paul@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: blauwirbel@gmail.com, qemu-devel@nongnu.org, Alexander Graf Paul Brook wrote: >> If anyone knows how to really fix this, please step forward and do >> so. This only makes things work at all for me :-). >> > > I bet lwsync being a nop is a clue. > > When an MMU exception occurs, qemu figures out the guest location from the > location of the MMU access in guest code (see cpu_restore_state). My guess is > that this breaks when two guest instructions have the same location. I'm not > entirely sure what the correct fix is, or where the bug lies > (cpu_restore_state, gen_intermediate_code_pc, or tcg_gen_code_search_pc) but > hopefully this will point you in the right direction. > > One thing to try (to confirm this theory) is make lwsync do domething (write > to a dummy register or call a helper function) and see if the problem goes > away. > Yep, that's the root cause. I just put in a movi to a temp var and that works as well. Mind to fix it? I'm actually only fixing the qemu ppc64 parts to debug kvm inside and am slowly running out of time to work on the kvm part of things ;). I'll also send a new patch series tomorrow - userspace works now and I can boot an openSUSE 11.1 DVD up to the installer prompt, though keyboard and serial ports don't work (but that's an OpenBIOS issue). Alex