qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Claudio Fontana <cfontana@suse.de>,
	Eduardo Habkost <ehabkost@redhat.com>
Cc: "Laurent Vivier" <lvivier@redhat.com>,
	"Wenchao Wang" <wenchao.wang@intel.com>,
	"Thomas Huth" <thuth@redhat.com>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Paul Durrant" <paul@xen.org>, "Olaf Hering" <ohering@suse.de>,
	"Jason Wang" <jasowang@redhat.com>,
	"Marcelo Tosatti" <mtosatti@redhat.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	qemu-devel@nongnu.org, "Cameron Esfahani" <dirty@apple.com>,
	"Bruce Rogers" <brogers@suse.com>,
	"Roman Bolshakov" <r.bolshakov@yadro.com>,
	"Emilio G . Cota" <cota@braap.org>,
	haxm-team@intel.com, "Peter Xu" <peterx@redhat.com>,
	"Anthony Perard" <anthony.perard@citrix.com>,
	"Sunil Muthuswamy" <sunilmut@microsoft.com>,
	"Dario Faggioli" <dfaggioli@suse.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Colin Xu" <colin.xu@intel.com>
Subject: Re: [RFC v5 09/12] module: introduce MODULE_INIT_ACCEL_CPU
Date: Wed, 25 Nov 2020 10:30:48 +0100	[thread overview]
Message-ID: <3360fb6f-d1ce-5b7e-0d2f-784e8a8345cf@redhat.com> (raw)
In-Reply-To: <7a3e2790-1924-3d03-d588-a904d7e19282@suse.de>

On 25/11/20 10:21, Claudio Fontana wrote:
> Hi Paolo,
> 
> in RFC v5 , module init for ACCEL_CPU is not conditional anymore, right?
> But the fact that its behavior depends on current_accel() still disqualifies it?
> It is called right after the accelerator is chosen and initialized
> in RFC v5, this still is "in the middle of the machine creation sequence"?
Yes, machine creation basically starts after command line parsing, or 
perhaps even _with_ command line parsing.  Basically once the user can 
control the flow it is already too late.

> I am trying to find the actual things to fix, since when doing RFC
> v5  I tried to specifically address two points:
> 
> 1) no if () inside module init functions
> 
> 2) no proliferation of module init functions
> 
> which I accomplished via AccelClass extension to user mode, current_accel(), and class lookup.

Yes, the rest is great, I'm just not sure that MODULE_INIT_ACCEL_CPU is 
useful and if virtual functions on accel and CPU_RESOLVING_TYPE can 
achieve the same.

> If MODULE_INIT_ACCEL_CPU remains an option, where would you like to see the call so that it is not "in the middle"?

No later than the runstate_init() call, roughly.

Paolo



  reply	other threads:[~2020-11-25  9:32 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-24 16:21 [RFC v5 00/12] i386 cleanup Claudio Fontana
2020-11-24 16:21 ` [RFC v5 01/12] i386: move kvm accel files into kvm/ Claudio Fontana
2020-11-24 16:22 ` [RFC v5 02/12] i386: move whpx accel files into whpx/ Claudio Fontana
2020-11-24 16:22 ` [RFC v5 03/12] i386: move hax accel files into hax/ Claudio Fontana
2020-11-24 16:22 ` [RFC v5 04/12] i386: hvf: remove stale MAINTAINERS entry for old hvf stubs Claudio Fontana
2020-11-24 16:22 ` [RFC v5 05/12] i386: move TCG accel files into tcg/ Claudio Fontana
2020-11-24 16:22 ` [RFC v5 06/12] i386: move cpu dump out of helper.c into cpu-dump.c Claudio Fontana
2020-11-24 16:22 ` [RFC v5 07/12] i386: move TCG cpu class initialization out of helper.c Claudio Fontana
2020-11-24 16:22 ` [RFC v5 08/12] accel: extend AccelState and AccelClass to user-mode Claudio Fontana
2020-11-24 17:56   ` Eduardo Habkost
2020-11-24 18:16     ` Claudio Fontana
2020-11-24 16:22 ` [RFC v5 09/12] module: introduce MODULE_INIT_ACCEL_CPU Claudio Fontana
2020-11-24 17:08   ` Eduardo Habkost
2020-11-24 18:29     ` Claudio Fontana
2020-11-24 19:08       ` Eduardo Habkost
2020-11-24 20:01         ` Paolo Bonzini
2020-11-25  9:21           ` Claudio Fontana
2020-11-25  9:30             ` Paolo Bonzini [this message]
2020-11-25 10:42               ` Claudio Fontana
2020-11-26 12:45               ` Claudio Fontana
2020-11-26 11:25   ` Philippe Mathieu-Daudé
2020-11-26 12:03     ` Claudio Fontana
2020-11-24 16:22 ` [RFC v5 10/12] i386: split cpu accelerators from cpu.c Claudio Fontana
2020-11-24 16:22 ` [RFC v5 11/12] i386: centralize initialization of cpu accel interfaces Claudio Fontana
2020-11-24 16:59   ` Eduardo Habkost
2020-11-24 18:38     ` Claudio Fontana
2020-11-24 20:13   ` Paolo Bonzini
2020-11-24 21:31     ` Eduardo Habkost
2020-11-25  9:26       ` Claudio Fontana
2020-11-26 10:57       ` Claudio Fontana
2020-11-26 13:44         ` Eduardo Habkost
2020-11-26 14:33           ` Claudio Fontana
2020-11-26 14:49             ` Eduardo Habkost
2020-11-26 14:55               ` Claudio Fontana
2020-11-26 15:14                 ` Eduardo Habkost
2020-11-26 15:34                   ` Claudio Fontana
2020-11-26 15:48                     ` Eduardo Habkost
2020-11-26 15:49                       ` Claudio Fontana
2020-11-26 15:14                 ` Paolo Bonzini
2020-11-25  9:24     ` Claudio Fontana
2020-11-26 14:42     ` Claudio Fontana
2020-11-24 16:22 ` [RFC v5 12/12] accel: centralize initialization of CpusAccelOps Claudio Fontana
2020-11-24 17:48   ` Eduardo Habkost
2020-11-24 18:52     ` Claudio Fontana
2020-11-24 19:27       ` Eduardo Habkost
2020-11-24 19:39         ` Claudio Fontana
2020-11-24 20:34           ` Eduardo Habkost
2020-11-25  9:32             ` Claudio Fontana
2020-11-25 11:48               ` Claudio Fontana
2020-11-25 14:51                 ` Eduardo Habkost
2020-11-24 20:14 ` [RFC v5 00/12] i386 cleanup Paolo Bonzini

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=3360fb6f-d1ce-5b7e-0d2f-784e8a8345cf@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=anthony.perard@citrix.com \
    --cc=brogers@suse.com \
    --cc=cfontana@suse.de \
    --cc=colin.xu@intel.com \
    --cc=cota@braap.org \
    --cc=dfaggioli@suse.com \
    --cc=dirty@apple.com \
    --cc=ehabkost@redhat.com \
    --cc=haxm-team@intel.com \
    --cc=jasowang@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=mtosatti@redhat.com \
    --cc=ohering@suse.de \
    --cc=paul@xen.org \
    --cc=peterx@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=r.bolshakov@yadro.com \
    --cc=richard.henderson@linaro.org \
    --cc=sstabellini@kernel.org \
    --cc=sunilmut@microsoft.com \
    --cc=thuth@redhat.com \
    --cc=wenchao.wang@intel.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).