qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC 7/9] target-i386: CPU subclass for -cpu "host"


From: Eduardo Habkost
Subject: Re: [Qemu-devel] [RFC 7/9] target-i386: CPU subclass for -cpu "host"
Date: Wed, 2 Jan 2013 18:20:00 -0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Jan 02, 2013 at 09:07:26PM +0100, Igor Mammedov wrote:
> On Wed, 2 Jan 2013 20:00:26 +0100
> Igor Mammedov <address@hidden> wrote:
> 
> > On Fri, 28 Dec 2012 18:34:04 -0200
> > Eduardo Habkost <address@hidden> wrote:
> > 
> > > Note that we are initializing the CPU features inside instance_init (and
> > > not storing any CPU feature information inside the class struct) because
> > > kvm_cpu_fill_host() needs KVM to be initialized, and we can't guarantee
> > > that KVM will be initialized when class_init is called.
> > initializing defaults in initfn will be broken after we convert features 
> > into
> > static properties due to all initfn()s are called before static properties
> > defaults are set.
> Never mind, It was my wish-full thinking;
> currently device_initfn() sets static property defaults, then sets global
> properties and only then children initfn()s are called.

So it won't break because of property defaults, but instead it will
break because we need global properties to work properly. It's even
worse because I didn't care about property defaults for -cpu host, but
we care about keeping global properties working (so
"-cpu host,+foobar,enforce" works).

-- 
Eduardo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]