From: Eduardo Habkost <ehabkost@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Igor Mammedov <imammedo@redhat.com>,
qemu-devel@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [RFC untested PATCH] i386/cpu: make -cpu host support monitor/mwait
Date: Wed, 13 Jun 2018 15:32:39 -0300 [thread overview]
Message-ID: <20180613183239.GH7451@localhost.localdomain> (raw)
In-Reply-To: <20180613211921-mutt-send-email-mst@kernel.org>
On Wed, Jun 13, 2018 at 09:22:10PM +0300, Michael S. Tsirkin wrote:
> On Wed, Jun 13, 2018 at 10:55:43AM +0200, Igor Mammedov wrote:
> > On Tue, 12 Jun 2018 11:49:22 -0300
> > Eduardo Habkost <ehabkost@redhat.com> wrote:
> >
> > > On Tue, Jun 12, 2018 at 03:58:03PM +0200, Igor Mammedov wrote:
> > > [...]
> > > > > > > + if (xcc->host_cpuid_required && enable_cpu_pm) {
> > > > > > > + host_cpuid(5, 0, &cpu->mwait.eax, &cpu->mwait.ebx,
> > > > > > > + &cpu->mwait.ecx, &cpu->mwait.edx);
> > > > > > > + }
> > [...]
> > > > > > also max_x86_cpu_initfn() might be better place for filling it up.
> > >
> > > Why?
> > I've missed 'enable_cpu_pm' which is probably a property,
> > so yep it can't go into initfn.
> >
> > However if we not going to migrate this state or use outside of
> > cpu_x86_cpuid(), I don't see why we should add it to X86CPU state
> > and keep around.
> > We can query it on demand from cpu_x86_cpuid() like we do for
> > PMU leaf.
>
> We can do it but the annoying thing is that it spreads
> the info around as we also need to set CPUID_EXT_MONITOR.
>
> This way we set all the info in one place on realize.
I agree. It also makes it easier to make the flags configurable
in the future.
We may eventually move the host-cache-info code to realizefn in
the future, too (if we want to make it work with VCPU topologies
that don't match the host exactly).
--
Eduardo
prev parent reply other threads:[~2018-06-13 18:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-08 20:59 [Qemu-devel] [RFC untested PATCH] i386/cpu: make -cpu host support monitor/mwait Michael S. Tsirkin
2018-06-08 21:22 ` no-reply
2018-06-08 23:12 ` no-reply
2018-06-11 21:52 ` Eduardo Habkost
2018-06-12 12:56 ` Igor Mammedov
2018-06-12 12:57 ` Michael S. Tsirkin
2018-06-12 13:58 ` Igor Mammedov
2018-06-12 14:49 ` Eduardo Habkost
2018-06-13 8:55 ` Igor Mammedov
2018-06-13 18:22 ` Michael S. Tsirkin
2018-06-13 18:32 ` Eduardo Habkost [this message]
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=20180613183239.GH7451@localhost.localdomain \
--to=ehabkost@redhat.com \
--cc=imammedo@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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).