From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:60610) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RAqgB-0002pJ-Re for qemu-devel@nongnu.org; Mon, 03 Oct 2011 18:08:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RAqgA-0006Lf-SG for qemu-devel@nongnu.org; Mon, 03 Oct 2011 18:08:07 -0400 Message-ID: <4E8A323F.2080109@freescale.com> Date: Mon, 3 Oct 2011 17:07:59 -0500 From: Scott Wood MIME-Version: 1.0 References: <1317674600-19083-1-git-send-email-sw@weilnetz.de> <1317674600-19083-3-git-send-email-sw@weilnetz.de> <4E8A208E.3050201@freescale.com> <4E8A24BC.1020506@weilnetz.de> <0689D6DD-AE05-4399-BEEA-993BD168023A@suse.de> <4E8A2E2C.2060004@freescale.com> <65EABF1C-407C-40C9-8638-7ACFA537A47A@suse.de> In-Reply-To: <65EABF1C-407C-40C9-8638-7ACFA537A47A@suse.de> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/2] tcg/ppc*: Move cache initialization to ppc specific code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: Stefan Weil , Paolo Bonzini , qemu-ppc@nongnu.org, QEMU Developers , Richard Henderson On 10/03/2011 05:06 PM, Alexander Graf wrote: > > On 03.10.2011, at 23:50, Scott Wood wrote: > >> On 10/03/2011 04:36 PM, Alexander Graf wrote: >>> With TCG, we're never executing guest code directly, but always go >>> through TCG to emulate it. So the only case where we actually need to >>> flush the icache is in TCG code generation, never outside, right? >> >> Right. >> >>> For KVM, I agree. We need some indication to flush the cache. But it >>> doesn't have to be done that complicated. We can simply do an inline >>> function that gets always called and has a few conditionals on when >>> to actually flush. That inline function could easily be a nop on >>> !ppc, though I'm not 100% sure that no other arch needs this. >> >> It's already an inline function that's a nop on !ppc. What >> simplification do you suggest? > > Is flush_icache_range() always defined on all hosts with all compiler > variants that QEMU supports? If not, we should have a small wrapper > that explicitly makes it a nop on !ppc. CC'ing Paolo and Richard for > clarification. It's defined in cache-utils.h using GCC-style inline asm, and is a no-op if _ARCH_PPC is not defined. -Scott