Received: from eggs.gnu.org ([208.118.235.92]:34855) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TqUlb-0002D9-G1 for qemu-devel@nongnu.org; Wed, 02 Jan 2013 15:18:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TqUla-0005nH-AK for qemu-devel@nongnu.org; Wed, 02 Jan 2013 15:18:23 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45921) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TqUla-0005mo-2U for qemu-devel@nongnu.org; Wed, 02 Jan 2013 15:18:22 -0500 Date: Wed, 2 Jan 2013 18:20:00 -0200 From: Eduardo Habkost Message-ID: <20130102202000.GK18372@otherpad.lan.raisama.net> References: <1356726846-10637-1-git-send-email-ehabkost@redhat.com> <1356726846-10637-8-git-send-email-ehabkost@redhat.com> <20130102200026.3ab5eee4@thinkpad.mammed.net> <20130102210726.3aae1692@thinkpad.mammed.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130102210726.3aae1692@thinkpad.mammed.net> Subject: Re: [Qemu-devel] [RFC 7/9] target-i386: CPU subclass for -cpu "host" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: qemu-devel@nongnu.org, Andreas =?iso-8859-1?Q?F=E4rber?= On Wed, Jan 02, 2013 at 09:07:26PM +0100, Igor Mammedov wrote: > On Wed, 2 Jan 2013 20:00:26 +0100 > Igor Mammedov wrote: > > > On Fri, 28 Dec 2012 18:34:04 -0200 > > Eduardo Habkost 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