From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49572) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VrmwH-0003wJ-LB for qemu-devel@nongnu.org; Sat, 14 Dec 2013 05:59:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vrmw5-00081u-R4 for qemu-devel@nongnu.org; Sat, 14 Dec 2013 05:59:17 -0500 Sender: Paolo Bonzini Message-ID: <52AC39F2.4010104@redhat.com> Date: Sat, 14 Dec 2013 11:58:58 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1386768216-33686-1-git-send-email-agraf@suse.de> <1386962330.10013.302.camel@snotra.buserror.net> In-Reply-To: <1386962330.10013.302.camel@snotra.buserror.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] roms: Flush icache when writing roms to guest memory List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Scott Wood Cc: Peter Maydell , "Bogdan.Vlad@freescale.com" , Alexander Graf , QEMU Developers , Marc Zyngier , "qemu-ppc@nongnu.org" , "mihai.caraman@freescale.com" , "Varun.Sethi@freescale.com" Il 13/12/2013 20:18, Scott Wood ha scritto: >> Also are you sure flush_icache_range() >> works correctly when multiple threads (multiple vCPUs, >> potentially executing on different host CPUs) are involved? > > On PPC these cache operations broadcast, and are the architecturally > defined way of doing self-modifying code. I expect that to be the same on any cache-coherent system. On a VIVT cache with shadow paging, some kernel collaboration may be necessary because you have to flush using guest addresses rather than host addresses (or alternatively you have to flush a whole context id). But we can fix the problem when it happens. Paolo