[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC untested PATCH] i386/cpu: make -cpu host support m
From: |
Eduardo Habkost |
Subject: |
Re: [Qemu-devel] [RFC untested PATCH] i386/cpu: make -cpu host support monitor/mwait |
Date: |
Wed, 13 Jun 2018 15:32:39 -0300 |
User-agent: |
Mutt/1.9.2 (2017-12-15) |
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 <address@hidden> 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