Received: from eggs.gnu.org ([208.118.235.92]:46163) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TPD3g-0003Zy-En for qemu-devel@nongnu.org; Fri, 19 Oct 2012 09:56:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TPD3Z-0005cQ-Dp for qemu-devel@nongnu.org; Fri, 19 Oct 2012 09:56:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:29286) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TPD3Z-0005cD-4Z for qemu-devel@nongnu.org; Fri, 19 Oct 2012 09:56:09 -0400 Date: Fri, 19 Oct 2012 10:56:57 -0300 From: Eduardo Habkost Message-ID: <20121019135657.GA16289@otherpad.lan.raisama.net> References: <1350352644-14436-1-git-send-email-imammedo@redhat.com> <1350352644-14436-4-git-send-email-imammedo@redhat.com> <87a9vlugfc.fsf@codemonkey.ws> <20121017181442.GP16289@otherpad.lan.raisama.net> <874nlqor4b.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <874nlqor4b.fsf@blackfin.pond.sub.org> Subject: Re: [Qemu-devel] [PATCH 03/12] qdev: separate core from the code used only by qemu-system-* List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: Igor Mammedov , Anthony Liguori , qemu-devel@nongnu.org, afaerber@suse.de, pbonzini@redhat.com On Fri, Oct 19, 2012 at 09:31:00AM +0200, Markus Armbruster wrote: > Eduardo Habkost writes: > > > On Wed, Oct 17, 2012 at 01:00:55PM -0500, Anthony Liguori wrote: > [...] > >> I don't really understand the split here and the 'system' suffix really > >> doesn't explain it for me. Could you at least add a comment to each of > >> these files explaining what belongs in them? > > > > "system" here means "Code used only by qemu-system-*" (in other words, > > not used by *-user, and not part of the qdev core). Do you have other > > name suggestions? > > > > The goal here is to make qdev-core.c/qdev-properties as small as > > possible (only what's absolutely required for the CPU classes), and put > > everything else (that's only used by qemu-system-*) into > > qdev-system.c/qdev-properties-system.c. > > Creates a permanent if minor development burden: where should my > property code go? > > Doubt it's worth the trouble: > > text data bss dec hex filename > 15897 1448 0 17345 43c1 bld/hw/qdev-properties.o > > In theory, link-time optimizations can drop unused code. Not sure they > do in practice. The reason for the split is not just to reduce qdev-core size, but keep qdev dependencies under control (so it becomes feasible to use qdev on *-user). Most of the code moved to qdev-properties-system.c was moved because it depends on other code that we don't include on *-user (like bdrv_get_device_name(), net_hub_port_find(), net_hub_id_for_client(), qemu_find_netdev(), bdrv_get_device_name(), qemu_chr_find()). -- Eduardo