qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eduardo Habkost <ehabkost@redhat.com>
To: Igor Mammedov <imammedo@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] in a device or CPU instance init/realize, can I rely on something having the BQL or equivalent?
Date: Fri, 8 Dec 2017 14:14:22 -0200	[thread overview]
Message-ID: <20171208161422.GW3037@localhost.localdomain> (raw)
In-Reply-To: <20171208155050.1a6db1c2@redhat.com>

On Fri, Dec 08, 2017 at 03:50:50PM +0100, Igor Mammedov wrote:
> On Fri, 8 Dec 2017 13:19:27 +0000
> Peter Maydell <peter.maydell@linaro.org> wrote:
> 
> > On 8 December 2017 at 13:16, Igor Mammedov <imammedo@redhat.com> wrote:
> > > TBH:
> > >  I do not recall why we have x86 max/host cpu types do feature
> > >  loading at realize time instead of at class init like the rest
> > >  of static cpu types.  
> > 
> > class init is too early, IIRC -- it's before KVM has been set up at all.
> 
> that shouldn't be an issue as kvm_ppc_register_host_cpu_type() demonstrates
> (i.e. an additional class init at kvm/tcg init time),

It is possible, but IMO it's not a good idea.  We should be able
to enumerate all CPU types before the accelerator has been
initialized, so query-cpu-definitions and "-cpu help" will always
work.


> 
> so it might be some compat issue or just legacy approach why it
> havn't been rewritten to class_init for x86 the way PPC does.
> But Eduardo probably knows better if there is anything left that
> prevents using class init there.

It's the opposite: x86 "host" CPU model used to work the same way
as PPC, but we changed it so all classes are registered at
type_init()-time.

-- 
Eduardo

  parent reply	other threads:[~2017-12-08 16:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-07 16:05 [Qemu-devel] in a device or CPU instance init/realize, can I rely on something having the BQL or equivalent? Peter Maydell
2017-12-07 16:48 ` Igor Mammedov
2017-12-07 16:53   ` Peter Maydell
2017-12-07 17:07     ` Eduardo Habkost
2017-12-07 17:13       ` Peter Maydell
2017-12-07 17:26         ` Peter Maydell
2017-12-08 13:16           ` Igor Mammedov
2017-12-08 13:19             ` Peter Maydell
2017-12-08 14:50               ` Igor Mammedov
2017-12-08 15:05                 ` Peter Maydell
2017-12-08 16:14                 ` Eduardo Habkost [this message]
2017-12-08 17:32                   ` Igor Mammedov
2017-12-08 17:58                     ` Eduardo Habkost

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=20171208161422.GW3037@localhost.localdomain \
    --to=ehabkost@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.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).