From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:34251) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJQLG-000315-Uc for qemu-devel@nongnu.org; Wed, 03 Oct 2012 10:54:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TJQLC-0006Yf-Uc for qemu-devel@nongnu.org; Wed, 03 Oct 2012 10:54:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:4790) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJQLC-0006Xa-1h for qemu-devel@nongnu.org; Wed, 03 Oct 2012 10:54:26 -0400 Message-ID: <506C519E.1070703@redhat.com> Date: Wed, 03 Oct 2012 16:54:22 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1349270954-4657-1-git-send-email-ehabkost@redhat.com> <1349270954-4657-3-git-send-email-ehabkost@redhat.com> <506C4E46.2050106@redhat.com> <20121003145347.GR15784@otherpad.lan.raisama.net> In-Reply-To: <20121003145347.GR15784@otherpad.lan.raisama.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC 02/18] pc: create PC object on pc_init1() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost Cc: Igor Mammedov , qemu-devel@nongnu.org, Gleb Natapov , =?ISO-8859-1?Q?Andreas_F=E4rber?= Il 03/10/2012 16:53, Eduardo Habkost ha scritto: >> > >> > Can you add a hook to QEMUMachine so that this object is created by >> > qdev_get_machine() and ends up at /machine? > Oh, I didn't know there was an existing "machine" object already, I > didn't know qdev_get_machine(). > > Shouldn't /machine be a child of the "container" class? It should, but note that "container" is really just the same as TYPE_OBJECT. It is only for clarity that a difference class is used. So using TYPE_DEVICE for now is not too bad. Paolo > That leads to > the other question you asked in another message: in this case, PC > wouldn't be a child of DeviceState, and we would need an additional > mechanism to allow non-DeviceState objects to use global properties. > > (The sole reason I introduced the PC class was to allow the PC code to > use the compatibility "contiguous_apic_ids" global property.)