From: Eduardo Habkost <ehabkost@redhat.com>
To: Laurent Vivier <lvivier@redhat.com>
Cc: qemu-devel@nongnu.org, David Gibson <david@gibson.dropbear.id.au>,
Paolo Bonzini <pbonzini@redhat.com>,
Peter Maydell <peter.maydell@linaro.org>,
Bharata B Rao <bharata@linux.vnet.ibm.com>,
Markus Armbruster <armbru@redhat.com>,
Matthew Rosato <mjrosato@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [PATCH v2 02/20] target-i386: move back cpu_exec_init() to init
Date: Fri, 14 Oct 2016 10:48:58 -0300 [thread overview]
Message-ID: <20161014134858.GG3275@thinpad.lan.raisama.net> (raw)
In-Reply-To: <38cc28b0-f087-6435-9fb3-136a5b6def7e@redhat.com>
On Fri, Oct 14, 2016 at 03:34:17PM +0200, Laurent Vivier wrote:
> On 14/10/2016 15:33, Eduardo Habkost wrote:
> > On Thu, Oct 13, 2016 at 06:24:44PM +0200, Laurent Vivier wrote:
> >> We have now the cpu_exec_realize() in realize,
> >> so the init part must be in init.
> >>
> >> I've removed the cannot_destroy_with_object_finalize_yet field as
> >> unsafe references have been moved to cpu_exec_realize().
> >> (tested with QOM command provided by commit 4c315c27 with
> >> "athlon-x86_64-cpu")
> >>
> >> CC: Eduardo Habkost <ehabkost@redhat.com>
> >> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
> >
> > Resending the question I asked in my reply to v1:
> >
> > Instead of creating requiring each subclass to manually call
> > cpu_exec_init()) on instance_init, why don't we move parts of
> > cpu_exec_init()/cpu_exec_realize() code to cpu_common_initfn()?
> > (TYPE_CPU's instance_init)
> >
> > (And if there's any code that needs to be run after the
> > subclasses instance_init functions, we can just add a
> > instance_post_init function to TYPE_CPU).
> >
>
> It's done in PATCH 20/20.
>
> Is that what you want?
Yes (except that I would have inlined the the cpu_exec_init()
code inside cpu_common_init()).
I think I expected this to be done in a single step, that
wouldn't require touching code for all architectures three times.
Something like:
1) Move cpu->as, cpu->num_ases, cpu->thread_id, cpu->memory
initialization, and "memory" property registration from
cpu_exec_init() to cpu_common_init() (no architecture code
touched).
2) (optional) Rename cpu_exec_init() to cpu_exec_realize() (only
trivial changes in architecture code)
--
Eduardo
next prev parent reply other threads:[~2016-10-14 13:49 UTC|newest]
Thread overview: 42+ 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 [this message]
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
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-arm] [PATCH v2 05/20] target-arm: move cpu_exec_realize() to realize function Laurent Vivier
2016-10-13 16:24 ` [Qemu-devel] " 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=20161014134858.GG3275@thinpad.lan.raisama.net \
--to=ehabkost@redhat.com \
--cc=armbru@redhat.com \
--cc=bharata@linux.vnet.ibm.com \
--cc=david@gibson.dropbear.id.au \
--cc=lvivier@redhat.com \
--cc=mjrosato@linux.vnet.ibm.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.