From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LfELB-00023s-3H for qemu-devel@nongnu.org; Thu, 05 Mar 2009 09:14:25 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LfEL7-000224-Bx for qemu-devel@nongnu.org; Thu, 05 Mar 2009 09:14:23 -0500 Received: from [199.232.76.173] (port=51870 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LfEL6-00021f-Hb for qemu-devel@nongnu.org; Thu, 05 Mar 2009 09:14:20 -0500 Received: from ns.suse.de ([195.135.220.2]:49854 helo=mx1.suse.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LfEL5-0004ms-R2 for qemu-devel@nongnu.org; Thu, 05 Mar 2009 09:14:20 -0500 From: Alexander Graf Date: Thu, 5 Mar 2009 15:14:14 +0100 Message-Id: <1236262454-6293-8-git-send-email-agraf@suse.de> In-Reply-To: <1236262454-6293-7-git-send-email-agraf@suse.de> References: <1236262454-6293-1-git-send-email-agraf@suse.de> <1236262454-6293-2-git-send-email-agraf@suse.de> <1236262454-6293-3-git-send-email-agraf@suse.de> <1236262454-6293-4-git-send-email-agraf@suse.de> <1236262454-6293-5-git-send-email-agraf@suse.de> <1236262454-6293-6-git-send-email-agraf@suse.de> <1236262454-6293-7-git-send-email-agraf@suse.de> Subject: [Qemu-devel] [PATCH 7/7] PPC64: Don't fault at lwsync Reply-To: 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 Cc: blauwirbel@gmail.com, Alexander Graf Right now we can throw a fault on lwsync, even though the fault is actually caused by the instruction after lwsync. I haven't found the magic that messed this up, but for now we can just end the TB on lwsync, forcing the next command to issue faults itself. If anyone knows how to really fix this, please step forward and do so. This only makes things work at all for me :-). Signed-off-by: Alexander Graf --- target-ppc/translate.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/target-ppc/translate.c b/target-ppc/translate.c index b5de33b..c994ad7 100644 --- a/target-ppc/translate.c +++ b/target-ppc/translate.c @@ -3289,6 +3289,10 @@ GEN_HANDLER2(stdcx_, "stdcx.", 0x1F, 0x16, 0x06, 0x00000000, PPC_64B) /* sync */ GEN_HANDLER(sync, 0x1F, 0x16, 0x12, 0x039FF801, PPC_MEM_SYNC) { + // XXX without stopping here a page fault thinks it happens + // in the sync, which is obviously wrong. Let's just keep + // a sync as one TB as long as we don't do real SMP. + gen_stop_exception(ctx); } /* wait */ -- 1.6.0.2