From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 97F92C43460 for ; Mon, 12 Apr 2021 05:27:19 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 114966105A for ; Mon, 12 Apr 2021 05:27:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 114966105A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:52598 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lVp6U-0002Op-1i for qemu-devel@archiver.kernel.org; Mon, 12 Apr 2021 01:27:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52868) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lVp4L-0000q2-Rw; Mon, 12 Apr 2021 01:25:05 -0400 Received: from bilbo.ozlabs.org ([2401:3900:2:1::2]:40195 helo=ozlabs.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lVp4J-0000ma-Jn; Mon, 12 Apr 2021 01:25:05 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 4FJccj3pQcz9sWk; Mon, 12 Apr 2021 15:24:53 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1618205093; bh=fhXj7CrspZAcyo2/vfEYlppdpBZVMQ1gVc8PpGaEMcI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZQurH1MWFfGxfftKqlR1zPb7+43Im68Sy8cXrVGqh2bEulOmX6MMiGKGcTKVHb+B8 0R4ZkDdg3gFxo9E2qu2gvdlcQgM5oXLmMh4hfF9H3OM8NCjo5GHPhkffe5fui41Dim bLVUiVDJ+r5EJVx7Forpz30zTnqNCxpMAECn/rfM= Date: Mon, 12 Apr 2021 14:34:10 +1000 From: David Gibson To: Fabiano Rosas Subject: Re: [PATCH 1/4] target/ppc: Code motion required to build disabling tcg Message-ID: References: <20210409151916.97326-1-bruno.larsen@eldorado.org.br> <20210409151916.97326-2-bruno.larsen@eldorado.org.br> <87h7kf5jdy.fsf@linux.ibm.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="DZvB9rdIsL2HccBK" Content-Disposition: inline In-Reply-To: <87h7kf5jdy.fsf@linux.ibm.com> Received-SPF: pass client-ip=2401:3900:2:1::2; envelope-from=dgibson@ozlabs.org; helo=ozlabs.org X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lucas.araujo@eldorado.org.br, qemu-devel@nongnu.org, lagarcia@br.ibm.com, luis.pires@eldorado.org.br, fernando.valle@eldorado.org.br, qemu-ppc@nongnu.org, andre.silva@eldorado.org.br, "Bruno Larsen \(billionai\)" , matheus.ferst@eldorado.org.br Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" --DZvB9rdIsL2HccBK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 09, 2021 at 04:48:41PM -0300, Fabiano Rosas wrote: > "Bruno Larsen (billionai)" writes: >=20 > A general advice for this whole series is: make sure you add in some > words explaining why you decided to make a particular change. It will be > much easier to review if we know what were the logical steps leading to > the change. >=20 > > This commit does the necessary code motion from translate_init.c.inc >=20 > For instance, I don't immediately see why these changes are necessary. I > see that translate_init.c.inc already has some `#ifdef CONFIG_TCG`, so > why do we need to move a bunch of code into cpu.c instead of just adding > more code under ifdef CONFIG_TCG? (I'm not saying it's wrong, just trying= to > understand the reasoning). >=20 > Is translate_init.c.inc intended to be TCG only? But then I see you > moved TCG-only functions out of it (ppc_fixup_cpu) and left not TCG-only > functions (gen_spr_generic). >=20 > > This moves all functions that start with gdb_* into target/ppc/gdbstub.c > > and creates a new function that calls those and is called by ppc_cpu_re= alize >=20 > This looks like it makes sense regardless of disable-tcg, could we have > it in a standalone patch? >=20 > > All functions related to realizing the cpu have been moved to cpu.c, wh= ich > > may call functions from gdbstub or translate_init >=20 > Again, I don't disagree with this, but at first sight it doesn't seem > entirely related to disabling TCG. Fabioano's points seconded. This isn't necessarily a bad idea, but a rationale would really help. --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --DZvB9rdIsL2HccBK Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEdfRlhq5hpmzETofcbDjKyiDZs5IFAmBzzcIACgkQbDjKyiDZ s5JMmxAAvEfrjrFywNKwVx1jEZHyGCOFKqTQjCToiOyt52cFe1lWkClGt51xfbim rgTH3lCDLvMFinKoUPdsMKWlPLFqb4f4JnIh+cGkCnXAG/4cEzxHzdTXHmjdOXTP YUQlzVhRcRA82sxTzQlgBk/gF7sjelasK0VnkvQzyaoZkjFKYGiJwMliriM9ZAV6 yU/4sGKWXnXFvQoyVeDUk/IxEdxCkVBxkAJbI7EURn/qT1bvBb9IQgnny+v5MSyp wx4Btwhn0ggXyHS9wWCT8Ab07Ez1yUlFgLfY5Uu0+HZpOvbMIszl6B5R1uBI9y0L KfPFST/m28xqk499bmCVGNEmC/QI0ymRJwqVHc/tk/6j0xVkfw+PHHuC5hA89lDh PJrGW23n9QDK0zZHTG9zwqv09O31ELeizy4twhcDUOipGdUZwHi2Wc+70j/1Ykkf q7CQkQhfCFba7C4mQxOCTfJVPkIIgMJ+sC2qaFLjRvm6E50cJ7hyt/CF9tIMYKcp corUSzkeUPBZqDw0KcwiX5ZFvipjV9tb5oqrOhCPIE2ytOUaCKFwWu9Wm46UuI+I 0njUGG2qrHW6MGEdD9BEphlOJVTCxv0ZMMggUdlzyAkTrdUMMNjjgzhKsHjnKDeH 2RyMmZ3SIRXA7NwtCJIqbguN7Zv3ygWda2FUG7tJH/AeKK8u0mE= =NrbG -----END PGP SIGNATURE----- --DZvB9rdIsL2HccBK--