From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:55837) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJpth-0003u5-Ja for qemu-devel@nongnu.org; Thu, 04 Oct 2012 14:11:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TJptg-0000En-I9 for qemu-devel@nongnu.org; Thu, 04 Oct 2012 14:11:45 -0400 Received: from mail-oa0-f45.google.com ([209.85.219.45]:57621) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJmPR-0006rn-NE for qemu-devel@nongnu.org; Thu, 04 Oct 2012 10:28:17 -0400 Received: by mail-oa0-f45.google.com with SMTP id i18so489800oag.4 for ; Thu, 04 Oct 2012 07:28:17 -0700 (PDT) From: Anthony Liguori In-Reply-To: <506D940D.7080600@redhat.com> 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> Date: Thu, 04 Oct 2012 09:28:13 -0500 Message-ID: <87fw5uxqf6.fsf@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: Paolo Bonzini Cc: Igor Mammedov , Gleb Natapov , Eduardo Habkost , Andreas =?utf-8?Q?F=C3=A4rber?= , qemu-devel@nongnu.org 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). Regards, Anthony Liguori > > Paolo