From: David Gibson <david@gibson.dropbear.id.au>
To: Laurent Vivier <lvivier@redhat.com>
Cc: qemu-devel@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
Peter Maydell <peter.maydell@linaro.org>,
Eduardo Habkost <ehabkost@redhat.com>,
Bharata B Rao <bharata@linux.vnet.ibm.com>,
Markus Armbruster <armbru@redhat.com>,
Matthew Rosato <mjrosato@linux.vnet.ibm.com>,
Alexander Graf <agraf@suse.de>,
qemu-ppc@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2 03/20] target-ppc: move back cpu_exec_init() to init
Date: Fri, 14 Oct 2016 15:07:51 +1100 [thread overview]
Message-ID: <20161014040751.GD28562@umbus> (raw)
In-Reply-To: <1476375902-11715-4-git-send-email-lvivier@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2003 bytes --]
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.
>
> As cpu_exec_unrealize() is called from cpu_common_finalize(),
> remove the call from ppc_cpu_unrealizefn().
>
> CC: Bharata B Rao <bharata@linux.vnet.ibm.com>
> CC: Alexander Graf <agraf@suse.de>
> CC: qemu-ppc@nongnu.org
> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
> ---
> target-ppc/translate_init.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> 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, Error **errp)
> }
> #endif
>
> - cpu_exec_init(cs);
> cpu_exec_realize(cs, &local_err);
> if (local_err != NULL) {
> error_propagate(errp, local_err);
> @@ -9911,8 +9910,6 @@ static void ppc_cpu_unrealizefn(DeviceState *dev, Error **errp)
> opc_handler_t **table, **table_2;
> int i, j, k;
>
> - 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 = 0; i < PPC_CPU_OPCODES_LEN; i++) {
> if (env->opcodes[i] == &invalid_handler) {
> continue;
> @@ -10435,6 +10432,7 @@ static void ppc_cpu_initfn(Object *obj)
> CPUPPCState *env = &cpu->env;
>
> cs->env_ptr = env;
> + cpu_exec_init(cs);
>
> env->msr_mask = pcc->msr_mask;
> env->mmu_model = pcc->mmu_model;
--
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-10-14 4:09 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-13 16:24 [Qemu-devel] [PATCH v2 00/20] Split cpu_exec_init() into an init and a realize part Laurent Vivier
2016-10-13 16:24 ` [Qemu-devel] [PATCH v2 01/20] exec: split cpu_exec_init() Laurent Vivier
2016-10-14 4:05 ` David Gibson
2016-10-14 7:56 ` Greg Kurz
2016-10-14 12:13 ` Laurent Vivier
2016-10-14 15:04 ` Greg Kurz
2016-10-14 13:55 ` Igor Mammedov
2016-10-14 13:57 ` Laurent Vivier
2016-10-14 14:11 ` Igor Mammedov
2016-10-14 14:13 ` Laurent Vivier
2016-10-14 14:26 ` Laurent Vivier
2016-10-13 16:24 ` [Qemu-devel] [PATCH v2 02/20] target-i386: move back cpu_exec_init() to init Laurent Vivier
2016-10-14 13:33 ` Eduardo Habkost
2016-10-14 13:34 ` Laurent Vivier
2016-10-14 13:48 ` Eduardo Habkost
2016-10-14 14:12 ` Laurent Vivier
2016-10-14 14:31 ` Eduardo Habkost
2016-10-14 14:33 ` Igor Mammedov
2016-10-14 14:43 ` Eduardo Habkost
2016-10-13 16:24 ` [Qemu-devel] [PATCH v2 03/20] target-ppc: " Laurent Vivier
2016-10-14 4:07 ` David Gibson [this message]
2016-10-14 7:12 ` Laurent Vivier
2016-10-14 14:49 ` Bharata B Rao
2016-10-14 17:26 ` Laurent Vivier
2016-10-13 16:24 ` [Qemu-devel] [PATCH v2 04/20] target-s390: " Laurent Vivier
2016-10-13 16:24 ` [Qemu-devel] [PATCH v2 05/20] target-arm: move cpu_exec_realize() to realize function Laurent Vivier
2016-10-13 16:24 ` [Qemu-devel] [PATCH v2 06/20] target-alpha: " Laurent Vivier
2016-10-13 16:24 ` [Qemu-devel] [PATCH v2 07/20] target-cris: " Laurent Vivier
2016-10-13 16:24 ` [Qemu-devel] [PATCH v2 08/20] target-lm32: " Laurent Vivier
2016-10-13 16:24 ` [Qemu-devel] [PATCH v2 09/20] target-m68k: " Laurent Vivier
2016-10-13 16:24 ` [Qemu-devel] [PATCH v2 10/20] target-microblaze: " Laurent Vivier
2016-10-13 16:24 ` [Qemu-devel] [PATCH v2 11/20] target-mips: " Laurent Vivier
2016-10-13 16:24 ` [Qemu-devel] [PATCH v2 12/20] target-moxie: " Laurent Vivier
2016-10-13 16:24 ` [Qemu-devel] [PATCH v2 13/20] target-openrisc: " Laurent Vivier
2016-10-13 16:24 ` [Qemu-devel] [PATCH v2 14/20] target-sh4: " Laurent Vivier
2016-10-13 16:24 ` [Qemu-devel] [PATCH v2 15/20] target-sparc: " Laurent Vivier
2016-10-13 16:24 ` [Qemu-devel] [PATCH v2 16/20] target-tilegx: " Laurent Vivier
2016-10-13 16:24 ` [Qemu-devel] [PATCH v2 17/20] target-tricore: " Laurent Vivier
2016-10-13 16:25 ` [Qemu-devel] [PATCH v2 18/20] target-unicore32: " Laurent Vivier
2016-10-13 16:25 ` [Qemu-devel] [PATCH v2 19/20] target-xtensa: " Laurent Vivier
2016-10-13 16:25 ` [Qemu-devel] [PATCH v2 20/20] exec: move cpu_exec_init() to cpu_common_initfn() Laurent Vivier
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=20161014040751.GD28562@umbus \
--to=david@gibson.dropbear.id.au \
--cc=agraf@suse.de \
--cc=armbru@redhat.com \
--cc=bharata@linux.vnet.ibm.com \
--cc=ehabkost@redhat.com \
--cc=lvivier@redhat.com \
--cc=mjrosato@linux.vnet.ibm.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/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).