From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:34952) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RAy9b-0002fR-SB for qemu-devel@nongnu.org; Tue, 04 Oct 2011 02:07:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RAy9a-0001W2-OG for qemu-devel@nongnu.org; Tue, 04 Oct 2011 02:06:59 -0400 From: Benjamin Herrenschmidt In-Reply-To: <4E8A2E77.5000309@freescale.com> 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> <4E8A2BCE.2050809@freescale.com> <0B280B67-1FF4-4144-82DB-298F4D45241A@suse.de> <4E8A2E77.5000309@freescale.com> Content-Type: text/plain; charset="UTF-8" Date: Tue, 04 Oct 2011 08:06:42 +0200 Message-ID: <1317708402.29415.215.camel@pasglop> Mime-Version: 1.0 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: Scott Wood Cc: Stefan Weil , qemu-ppc@nongnu.org, Alexander Graf , QEMU Developers > Not doing it sometimes invokes crash penalties for us. :-) > > We could add some way to skip the invalidation if we know the host is an > implementation that doesn't need it, possibly depending on the context > (is it just DMA he wants to avoid doing this on[1], or do their chips > have a fully coherent icache?), but IMHO functional correctness should > come first. > > -Scott > > [1] In which case we need to figure out how to tell at that point > whether it was DMA, preferably by something less hackish than saying, > "This function is used for DMA and breakpoints. Breakpoints are 4 > bytes, and flushing on a 4-byte DMA isn't as painful as larger DMAs." AT_HWCAP will tell you, look for PPC_FEATURE_ICACHE_SNOOP, in this case all you need is sync, one icbi, isync (the arch documents the sequence iirc). Cheers, Ben.