From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IoRGY-0006Br-9q for qemu-devel@nongnu.org; Sat, 03 Nov 2007 18:14:54 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IoRGW-00069H-T1 for qemu-devel@nongnu.org; Sat, 03 Nov 2007 18:14:54 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IoRGW-00068w-PZ for qemu-devel@nongnu.org; Sat, 03 Nov 2007 18:14:52 -0400 Received: from sp604005mt.neufgp.fr ([84.96.92.11] helo=smtp.Neuf.fr) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IoRGV-0000qH-UL for qemu-devel@nongnu.org; Sat, 03 Nov 2007 18:14:52 -0400 Received: from [86.73.70.118] by sp604005mt.gpm.neuf.ld (Sun Java System Messaging Server 6.2-5.05 (built Feb 16 2006)) with ESMTP id <0JQY00488B3KJLY1@sp604005mt.gpm.neuf.ld> for qemu-devel@nongnu.org; Sat, 03 Nov 2007 23:14:09 +0100 (CET) Date: Sat, 03 Nov 2007 23:13:45 +0100 From: Fabrice Bellard Subject: Re: [Qemu-devel] [PATCH, RFC] Disable implicit self-modifying code support for RISC CPUs In-reply-to: Message-id: <472CF299.9000104@bellard.org> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7BIT References: 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 Blue Swirl wrote: > Hi, > > RISC CPUs don't support self-modifying code unless the affected area > is flushed explicitly. This patch disables the extra effort for SMC. > The changes in this version would affect all CPUs except x86, but I'd > like to see if there are problems with some target, so that the > committed change can be limited. Without comments, I'll just disable > SMC for Sparc, as there are no problems. So please comment, especially > if you want to "opt in". > > For some reason, I can't disable all TB/TLB flushing, for example > there was already one line with TARGET_HAS_SMC || 1, but removing the > || 1 part causes crashing. Does anyone know why? With the current QEMU architecture, you cannot disable self-modifying code as you did. This is why I did not fully supported the TARGET_HAS_SMC flag. The problem is that the translator make the assumption that the RAM and the TB contents are consistent for example when handling exceptions. Suppressing this assumption is possible but requires more work. Regards, Fabrice.