From: Eduardo Habkost <ehabkost@redhat.com>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: "Igor Mammedov" <imammedo@redhat.com>,
"Hervé Poussineau" <hpoussin@reactos.org>,
"Aurelien Jarno" <aurelien@aurel32.net>,
"Marcel Apfelbaum" <marcel@redhat.com>,
"James Hogan" <james.hogan@imgtec.com>,
"Yongbok Kim" <yongbok.kim@imgtec.com>,
"Thomas Huth" <thuth@redhat.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2 4/7] mips: call cpu_mips_realize_env() from mips_cpu_realizefn()
Date: Fri, 15 Sep 2017 20:50:39 -0300 [thread overview]
Message-ID: <20170915235039.GA21016@localhost.localdomain> (raw)
In-Reply-To: <20170830225225.27925-5-f4bug@amsat.org>
On Wed, Aug 30, 2017 at 07:52:22PM -0300, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> Tested-by: Igor Mammedov <imammedo@redhat.com>
> Tested-by: James Hogan <james.hogan@imgtec.com>
> ---
> target/mips/cpu.c | 3 +++
> target/mips/translate.c | 1 -
> 2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/target/mips/cpu.c b/target/mips/cpu.c
> index 68bf423e9d..e3ef835599 100644
> --- a/target/mips/cpu.c
> +++ b/target/mips/cpu.c
> @@ -123,6 +123,7 @@ static void mips_cpu_disas_set_info(CPUState *s, disassemble_info *info) {
> static void mips_cpu_realizefn(DeviceState *dev, Error **errp)
> {
> CPUState *cs = CPU(dev);
> + MIPSCPU *cpu = MIPS_CPU(dev);
> MIPSCPUClass *mcc = MIPS_CPU_GET_CLASS(dev);
> Error *local_err = NULL;
>
> @@ -132,6 +133,8 @@ static void mips_cpu_realizefn(DeviceState *dev, Error **errp)
> return;
> }
>
> + cpu_mips_realize_env(&cpu->env);
> +
This changes the order between cpu_mips_realize_env() and
cpu_exec_initfn(), but cpu_exec_initfn() don't have anything that
depends on cpu_mips_realize_env() being called first.
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
> cpu_reset(cs);
> qemu_init_vcpu(cs);
>
> diff --git a/target/mips/translate.c b/target/mips/translate.c
> index 5fc7979ac5..94c38e8755 100644
> --- a/target/mips/translate.c
> +++ b/target/mips/translate.c
> @@ -20535,7 +20535,6 @@ MIPSCPU *cpu_mips_init(const char *cpu_model)
> cpu = MIPS_CPU(object_new(TYPE_MIPS_CPU));
> env = &cpu->env;
> env->cpu_model = def;
> - cpu_mips_realize_env(env);
>
> object_property_set_bool(OBJECT(cpu), true, "realized", NULL);
>
> --
> 2.14.1
>
>
--
Eduardo
next prev parent reply other threads:[~2017-09-15 23:50 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-30 22:52 [Qemu-devel] [PATCH v2 0/7] QOMify MIPS cpu Philippe Mathieu-Daudé
2017-08-30 22:52 ` [Qemu-devel] [PATCH v2 1/7] mips: move hw/mips/cputimer.c to target/mips/ Philippe Mathieu-Daudé
2017-08-30 22:52 ` [Qemu-devel] [PATCH v2 2/7] mips: introduce internal.h and cleanup cpu.h Philippe Mathieu-Daudé
2017-08-30 22:52 ` [Qemu-devel] [PATCH v2 3/7] mips: split cpu_mips_realize_env() out of cpu_mips_init() Philippe Mathieu-Daudé
2017-09-14 19:48 ` Eduardo Habkost
2017-08-30 22:52 ` [Qemu-devel] [PATCH v2 4/7] mips: call cpu_mips_realize_env() from mips_cpu_realizefn() Philippe Mathieu-Daudé
2017-09-15 23:50 ` Eduardo Habkost [this message]
2017-08-30 22:52 ` [Qemu-devel] [PATCH v2 5/7] mips: MIPSCPU model subclasses Philippe Mathieu-Daudé
2017-09-16 0:15 ` Eduardo Habkost
2017-09-17 22:38 ` Philippe Mathieu-Daudé
2017-08-30 22:52 ` [Qemu-devel] [PATCH v2 6/7] mips: replace cpu_mips_init() with cpu_generic_init() Philippe Mathieu-Daudé
2017-09-16 0:16 ` Eduardo Habkost
2017-08-30 22:52 ` [Qemu-devel] [PATCH v2 7/7] mips: update mips_cpu_list() to use object_class_get_list() Philippe Mathieu-Daudé
2017-09-16 0:20 ` Eduardo Habkost
2017-09-17 22:40 ` Philippe Mathieu-Daudé
2017-08-30 23:01 ` [Qemu-devel] [PATCH v2 0/7] QOMify MIPS cpu no-reply
2017-08-31 3:57 ` Philippe Mathieu-Daudé
2017-09-01 15:18 ` Eduardo Habkost
2017-09-01 15:44 ` Philippe Mathieu-Daudé
2017-09-01 15:48 ` Eduardo Habkost
2017-09-01 16:09 ` Philippe Mathieu-Daudé
2017-09-04 13:32 ` Yongbok Kim
2017-09-10 17:43 ` Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170915235039.GA21016@localhost.localdomain \
--to=ehabkost@redhat.com \
--cc=aurelien@aurel32.net \
--cc=f4bug@amsat.org \
--cc=hpoussin@reactos.org \
--cc=imammedo@redhat.com \
--cc=james.hogan@imgtec.com \
--cc=marcel@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
--cc=yongbok.kim@imgtec.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).