[{"id":1769510,"web_url":"http://patchwork.ozlabs.org/comment/1769510/","msgid":"<20170915235039.GA21016@localhost.localdomain>","list_archive_url":null,"date":"2017-09-15T23:50:39","subject":"Re: [Qemu-devel] [PATCH v2 4/7] mips: call cpu_mips_realize_env()\n\tfrom mips_cpu_realizefn()","submitter":{"id":195,"url":"http://patchwork.ozlabs.org/api/people/195/","name":"Eduardo Habkost","email":"ehabkost@redhat.com"},"content":"On Wed, Aug 30, 2017 at 07:52:22PM -0300, Philippe Mathieu-Daudé wrote:\n> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>\n> Tested-by: Igor Mammedov <imammedo@redhat.com>\n> Tested-by: James Hogan <james.hogan@imgtec.com>\n> ---\n>  target/mips/cpu.c       | 3 +++\n>  target/mips/translate.c | 1 -\n>  2 files changed, 3 insertions(+), 1 deletion(-)\n> \n> diff --git a/target/mips/cpu.c b/target/mips/cpu.c\n> index 68bf423e9d..e3ef835599 100644\n> --- a/target/mips/cpu.c\n> +++ b/target/mips/cpu.c\n> @@ -123,6 +123,7 @@ static void mips_cpu_disas_set_info(CPUState *s, disassemble_info *info) {\n>  static void mips_cpu_realizefn(DeviceState *dev, Error **errp)\n>  {\n>      CPUState *cs = CPU(dev);\n> +    MIPSCPU *cpu = MIPS_CPU(dev);\n>      MIPSCPUClass *mcc = MIPS_CPU_GET_CLASS(dev);\n>      Error *local_err = NULL;\n>  \n> @@ -132,6 +133,8 @@ static void mips_cpu_realizefn(DeviceState *dev, Error **errp)\n>          return;\n>      }\n>  \n> +    cpu_mips_realize_env(&cpu->env);\n> +\n\nThis changes the order between cpu_mips_realize_env() and\ncpu_exec_initfn(), but cpu_exec_initfn() don't have anything that\ndepends on cpu_mips_realize_env() being called first.\n\nReviewed-by: Eduardo Habkost <ehabkost@redhat.com>\n\n>      cpu_reset(cs);\n>      qemu_init_vcpu(cs);\n>  \n> diff --git a/target/mips/translate.c b/target/mips/translate.c\n> index 5fc7979ac5..94c38e8755 100644\n> --- a/target/mips/translate.c\n> +++ b/target/mips/translate.c\n> @@ -20535,7 +20535,6 @@ MIPSCPU *cpu_mips_init(const char *cpu_model)\n>      cpu = MIPS_CPU(object_new(TYPE_MIPS_CPU));\n>      env = &cpu->env;\n>      env->cpu_model = def;\n> -    cpu_mips_realize_env(env);\n>  \n>      object_property_set_bool(OBJECT(cpu), true, \"realized\", NULL);\n>  \n> -- \n> 2.14.1\n> \n>","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx06.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx06.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=ehabkost@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xvBxt4fxWz9sNc\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 16 Sep 2017 09:51:30 +1000 (AEST)","from localhost ([::1]:55408 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dt0OO-0006kk-Po\n\tfor incoming@patchwork.ozlabs.org; Fri, 15 Sep 2017 19:51:28 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:60947)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <ehabkost@redhat.com>) id 1dt0Np-0006im-IV\n\tfor qemu-devel@nongnu.org; Fri, 15 Sep 2017 19:50:54 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <ehabkost@redhat.com>) id 1dt0Nl-0001Oi-1e\n\tfor qemu-devel@nongnu.org; Fri, 15 Sep 2017 19:50:53 -0400","from mx1.redhat.com ([209.132.183.28]:35138)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <ehabkost@redhat.com>) id 1dt0Nk-0001OT-Kw\n\tfor qemu-devel@nongnu.org; Fri, 15 Sep 2017 19:50:48 -0400","from smtp.corp.redhat.com\n\t(int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 44513356E3;\n\tFri, 15 Sep 2017 23:50:47 +0000 (UTC)","from localhost (ovpn-116-24.gru2.redhat.com [10.97.116.24])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 93BC117CDB;\n\tFri, 15 Sep 2017 23:50:41 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 44513356E3","Date":"Fri, 15 Sep 2017 20:50:39 -0300","From":"Eduardo Habkost <ehabkost@redhat.com>","To":"Philippe =?iso-8859-1?q?Mathieu-Daud=E9?= <f4bug@amsat.org>","Message-ID":"<20170915235039.GA21016@localhost.localdomain>","References":"<20170830225225.27925-1-f4bug@amsat.org>\n\t<20170830225225.27925-5-f4bug@amsat.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=iso-8859-1","Content-Disposition":"inline","In-Reply-To":"<20170830225225.27925-5-f4bug@amsat.org>","X-Fnord":"you can see the fnord","User-Agent":"Mutt/1.8.3 (2017-05-23)","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.13","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.30]);\n\tFri, 15 Sep 2017 23:50:47 +0000 (UTC)","Content-Transfer-Encoding":"quoted-printable","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [PATCH v2 4/7] mips: call cpu_mips_realize_env()\n\tfrom mips_cpu_realizefn()","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Thomas Huth <thuth@redhat.com>, James Hogan <james.hogan@imgtec.com>,\n\tqemu-devel@nongnu.org, Yongbok Kim <yongbok.kim@imgtec.com>, \n\t=?iso-8859-1?q?Herv=E9?= Poussineau <hpoussin@reactos.org>,\n\tMarcel Apfelbaum <marcel@redhat.com>,\n\tIgor Mammedov <imammedo@redhat.com>, Aurelien Jarno\n\t<aurelien@aurel32.net>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}}]