Received: from eggs.gnu.org ([208.118.235.92]:52309) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJqoX-0007nk-1d for qemu-devel@nongnu.org; Thu, 04 Oct 2012 15:10:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TJmdl-0005UL-HW for qemu-devel@nongnu.org; Thu, 04 Oct 2012 10:44:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54286) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJmdh-0005QG-5x for qemu-devel@nongnu.org; Thu, 04 Oct 2012 10:43:02 -0400 Date: Thu, 4 Oct 2012 11:43:59 -0300 From: Eduardo Habkost Message-ID: <20121004144359.GA15784@otherpad.lan.raisama.net> References: <1349270954-4657-1-git-send-email-ehabkost@redhat.com> <1349270954-4657-2-git-send-email-ehabkost@redhat.com> <877gr6jqnt.fsf@codemonkey.ws> <506D940D.7080600@redhat.com> <87fw5uxqf6.fsf@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87fw5uxqf6.fsf@codemonkey.ws> Subject: Re: [Qemu-devel] [RFC 01/18] pc: create "PC" device class List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Paolo Bonzini , Gleb Natapov , qemu-devel@nongnu.org, Andreas =?iso-8859-1?Q?F=E4rber?= , Igor Mammedov On Thu, Oct 04, 2012 at 09:28:13AM -0500, Anthony Liguori wrote: > Paolo Bonzini writes: > > > Il 04/10/2012 15:46, Anthony Liguori ha scritto: > >>> > +typedef struct PC { > >>> > + DeviceState parent_obj; > >>> > +} PC; > >> So the general problem with this approach is that it strays from > >> modeling hardware. > > > > It doesn't really; it's a motherboard object, there's no reason why > > /machine shouldn't be a Device itself, with a few objects (CPUs, the > > i440FX, the IOAPIC, and of course the peripherals) hanging off it. > > Okay, but modeling a motherboard is different than creating a "PC" > object and throwing in the kitchen skink. > > And I'm not sure that going top-down is the best strategy. I think > going bottom up makes more sense (starting with modeling Super IO chip). > So, would you be OK with this implementation if the class were named "Motherboard", "set-of-CPU-sockets", or something like that? (The change on the APIC ID generation logic is not something that affects only individual CPUs or APICs, but the fw_cfg NUMA & CPU hotplug code as well, that's why I don't think "contiguous_apic_ids" should be a property of CPU or APIC objects). > Regards, > > Anthony Liguori > > > > > Paolo -- Eduardo