Received: from [140.186.70.92] (port=50241 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PKygJ-0000MA-Vh for qemu-devel@nongnu.org; Tue, 23 Nov 2010 14:37:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PKygD-0007w3-BJ for qemu-devel@nongnu.org; Tue, 23 Nov 2010 14:37:35 -0500 Received: from cantor2.suse.de ([195.135.220.15]:59147 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PKygD-0007ue-2w for qemu-devel@nongnu.org; Tue, 23 Nov 2010 14:37:29 -0500 Subject: Re: [Qemu-devel] [PATCH 10/12] config: Add header file for device config options Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: text/plain; charset=us-ascii From: Alexander Graf In-Reply-To: Date: Tue, 23 Nov 2010 20:37:24 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <7FE77317-3AAA-43AB-925D-8AEF048AD100@suse.de> References: <1290522889-27559-1-git-send-email-agraf@suse.de> <1290522889-27559-11-git-send-email-agraf@suse.de> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: Kevin Wolf , Joerg Roedel , QEMU-devel Developers , Gerd Hoffmann , Stefan Hajnoczi , tj@kernel.org, Sebastian Herbszt , Roland Elek On 23.11.2010, at 20:21, Blue Swirl wrote: > On Tue, Nov 23, 2010 at 2:34 PM, Alexander Graf wrote: >> So far we have C preprocessor defines for target and host config >> options, but we're lacking any information on which devices are >> available. >>=20 >> We do need that information at times though, for example in the >> ahci patch where we need to call a legacy init function depending >> on whether we have support compiled in or not. >>=20 >> So this patch makes all config-devices options available as header >> file. Please only include it in machine description code! >=20 > How about including config-devices.h from hw/boards.h instead? On the > downside, all targets will be recompiled when config-devices.h change, > even if they don't have any device dependencies. Not sure it makes sense to do this change this time around. If we can = avoid dependency on device configuration, we should. So if we can limit = the scope this is included in, it's good IMHO. In fact, maybe the correct solution to the issue would be to move the = legacy -drive instantiation to the -drive code, as it is already with = virtio-blk. If used with -device and -drive ...,if=3Dnone the whole = magic isn't necessary anyways. Alex