All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Igor Mammedov <imammedo@redhat.com>
Cc: Eduardo Habkost <ehabkost@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 21:22:10 +0300	[thread overview]
Message-ID: <20180613211921-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20180613105543.32e58e99@redhat.com>

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.

-- 
MST

  reply	other threads:[~2018-06-13 18:22 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 [this message]
2018-06-13 18:32             ` 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=20180613211921-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=imammedo@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 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.