From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:46099) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RAxzD-0000zi-Ke for qemu-devel@nongnu.org; Tue, 04 Oct 2011 01:56:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RAxzC-0000Ay-Ab for qemu-devel@nongnu.org; Tue, 04 Oct 2011 01:56:15 -0400 Message-ID: <4E8A9FCA.5080801@weilnetz.de> Date: Tue, 04 Oct 2011 07:55:22 +0200 From: Stefan Weil 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> <4E8A2BCE.2050809@freescale.com> In-Reply-To: <4E8A2BCE.2050809@freescale.com> Content-Type: text/plain; charset=UTF-8; format=flowed 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: Peter Maydell , qemu-ppc@nongnu.org, QEMU Developers , Alexander Graf Am 03.10.2011 23:40, schrieb Scott Wood: > On 10/03/2011 04:10 PM, Stefan Weil wrote: >> Am 03.10.2011 22:52, schrieb Scott Wood: >>> On 10/03/2011 03:43 PM, Stefan Weil wrote: >>>> qemu_cache_utils_init() is only used by ppc / ppc64 tcg targets >>>> to initialize the cache before flush_icache_range() is called. >>>> >>>> This patch moves the code to tcg/ppc and tcg/ppc64. >>>> Initialisation is called from tcg_target_init() there. >>>> >>>> Signed-off-by: Stefan Weil >>> >>> This is not only needed for TCG. We need flush_icache_range() for KVM. >>> See http://patchwork.ozlabs.org/patch/90403/ and the thread starting >>> with http://lists.gnu.org/archive/html/qemu-ppc/2011-09/msg00180.html >>> >>> And must this be duplicated between ppc and ppc64? >>> >>> -Scott >> >> Your patch 90403 is obviously still missing in QEMU master - >> that's the reason why I did not notice that PPC KVM needs >> flush_icache_range(). > > Yes... > > Alex, is there any objection to merging 90403? > >> qemu_cache_utils_init() should be called from kvm_init() >> and tcg_init() or some function called there > > The interface isn't powerpc-specific. It just happens to be the only > arch so far that qemu supports that needs the implementation to do > something (or possibly just the only one where that need has been > discovered). > > What problem is it causing the way it is? My patch was triggered by this discussion thread and a remark from Peter Maydell: http://lists.nongnu.org/archive/html/qemu-devel/2011-09/msg02272.html The only problem is that ppc differs from all other hosts: * No other host needs qemu_cache_utils_init() today. * All other hosts define flush_icache_range() in tcg-target.h. * All other hosts only call flush_icache_range() from tcg code. I learned now that ppc will need flush_icache_range() for kvm, too. So it won't be possible to implement a uniform handling of flush_icache_range() for all host architectures. - Stefan