From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:32869) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RAqj1-0003Zc-FF for qemu-devel@nongnu.org; Mon, 03 Oct 2011 18:11:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RAqj0-0006rO-1v for qemu-devel@nongnu.org; Mon, 03 Oct 2011 18:11:03 -0400 Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Alexander Graf In-Reply-To: <4E8A323F.2080109@freescale.com> Date: Tue, 4 Oct 2011 00:11:00 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <442F2858-5ED3-4B8F-9A8F-5D5BEDFB2327@suse.de> 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> <4E8A323F.2080109@freescale.com> 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: Scott Wood Cc: Stefan Weil , Paolo Bonzini , qemu-ppc@nongnu.org, QEMU Developers , Richard Henderson On 04.10.2011, at 00:07, Scott Wood wrote: > On 10/03/2011 05:06 PM, Alexander Graf wrote: >>=20 >> On 03.10.2011, at 23:50, Scott Wood wrote: >>=20 >>> 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? >>>=20 >>> Right. >>>=20 >>>> 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. >>>=20 >>> It's already an inline function that's a nop on !ppc. What >>> simplification do you suggest? >>=20 >> 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. >=20 > It's defined in cache-utils.h using GCC-style inline asm, and is a = no-op > if _ARCH_PPC is not defined. Ah, there it's hiding. It sounded a lot like the gcc built-in version. So all we need is a nop'ing version in the !_ARCH_PPC case, right? And = then later some way to make book3s fast again for coherent caching = machines. Alex