From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41805) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1butoG-0007IE-8T for qemu-devel@nongnu.org; Fri, 14 Oct 2016 00:09:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1butoA-0000Pz-OV for qemu-devel@nongnu.org; Fri, 14 Oct 2016 00:09:26 -0400 Date: Fri, 14 Oct 2016 15:07:51 +1100 From: David Gibson Message-ID: <20161014040751.GD28562@umbus> References: <1476375902-11715-1-git-send-email-lvivier@redhat.com> <1476375902-11715-4-git-send-email-lvivier@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="n/aVsWSeQ4JHkrmm" Content-Disposition: inline In-Reply-To: <1476375902-11715-4-git-send-email-lvivier@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2 03/20] target-ppc: move back cpu_exec_init() to init List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laurent Vivier Cc: qemu-devel@nongnu.org, Paolo Bonzini , Peter Maydell , Eduardo Habkost , Bharata B Rao , Markus Armbruster , Matthew Rosato , Alexander Graf , qemu-ppc@nongnu.org --n/aVsWSeQ4JHkrmm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Oct 13, 2016 at 06:24:45PM +0200, Laurent Vivier wrote: > We have now the cpu_exec_realize() in realize, > so the init part must be in init. >=20 > As cpu_exec_unrealize() is called from cpu_common_finalize(), > remove the call from ppc_cpu_unrealizefn(). >=20 > CC: Bharata B Rao > CC: Alexander Graf > CC: qemu-ppc@nongnu.org > Signed-off-by: Laurent Vivier > --- > target-ppc/translate_init.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) >=20 > diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c > index 094f28a..bbca8b5 100644 > --- a/target-ppc/translate_init.c > +++ b/target-ppc/translate_init.c > @@ -9678,7 +9678,6 @@ static void ppc_cpu_realizefn(DeviceState *dev, Err= or **errp) > } > #endif > =20 > - cpu_exec_init(cs); > cpu_exec_realize(cs, &local_err); > if (local_err !=3D NULL) { > error_propagate(errp, local_err); > @@ -9911,8 +9910,6 @@ static void ppc_cpu_unrealizefn(DeviceState *dev, E= rror **errp) > opc_handler_t **table, **table_2; > int i, j, k; > =20 > - cpu_exec_unrealize(CPU(dev)); > - This doesn't seem right. As you said in 0/20, cpu_exec_unrealize() is called from cpu_common_finalize(). But finalize should mirror init, not unrealize(). So it seems that unrealize() really should belong here, not in finalize. > for (i =3D 0; i < PPC_CPU_OPCODES_LEN; i++) { > if (env->opcodes[i] =3D=3D &invalid_handler) { > continue; > @@ -10435,6 +10432,7 @@ static void ppc_cpu_initfn(Object *obj) > CPUPPCState *env =3D &cpu->env; > =20 > cs->env_ptr =3D env; > + cpu_exec_init(cs); > =20 > env->msr_mask =3D pcc->msr_mask; > env->mmu_model =3D pcc->mmu_model; --=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 --n/aVsWSeQ4JHkrmm Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJYAFoWAAoJEGw4ysog2bOSBVcQANQV2Kq7JS9iJdOVoOYUMXzh XdEPchV9c/Se9W4lvefx5Q5fPna3AUEvVf7ZZR8sK1saI1Gs7BpckfzlA5eFK06g VfsHRjEUsIMmfRusZa1G6zHHHBSoeoJyJlWakImNfIsq85YWfEGAaDI6qaOb3XmW UVgFvacn+dXw+i6yTgZEfeCx2Ol3e6qorVSk5W57xQ3kZG+6SamhXE9/BcZqgRIJ eSA7rkUFRhd3bvNQUIDMlQIeudnzBMzu18XfDaSB7K03YbwiTdDa8u8KzS0sRj3t Du2snoTUyvVKcg6kQMYMl6uQ5SEaYtVgERp+o69Whenis/A+B02WT7ZhHYCvh+tn itu8o1W1eC9a0UJ9iP+3YB5XnoHF00EXVDfhRteZFRsORh8G/gtPVv8smcUTgLRp KcxxCtT5z8Z9PfWv3q/3n3y5Wot1Sv9qlsKs92Z3xJT3j4W+mWi7LT0+JLFx22fT t8rpjt17HFY3eUGa80uK5BZH/GZ8M8L6xypOUP6hH5nWN/zsukHF0kZEKrjUoQ5h nOO1mkT5WWEecxBsc8TwOUZIOpG4rm1sKEH+8bE6c53LR2hHOiR3cqrTbE+PAKkL wrSV6AddveyNMLKC+kPE7PdRyV1iXD+Ty9NTYtoGumoClXcuigx3LdpQb3OJ13PS BZo6X/cj//goWKIhn6Ca =uQF2 -----END PGP SIGNATURE----- --n/aVsWSeQ4JHkrmm--