From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nx3Zv-0000Zm-Hq for qemu-devel@nongnu.org; Wed, 31 Mar 2010 15:27:51 -0400 Received: from [140.186.70.92] (port=46840 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nx3Zt-0000WL-W9 for qemu-devel@nongnu.org; Wed, 31 Mar 2010 15:27:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nx3Zs-0007JJ-55 for qemu-devel@nongnu.org; Wed, 31 Mar 2010 15:27:49 -0400 Received: from mail-pw0-f45.google.com ([209.85.160.45]:45247) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nx3Zr-0007Iw-T8 for qemu-devel@nongnu.org; Wed, 31 Mar 2010 15:27:48 -0400 Received: by pwi6 with SMTP id 6so447756pwi.4 for ; Wed, 31 Mar 2010 12:27:46 -0700 (PDT) Message-ID: <4BB3A230.4080606@codemonkey.ws> Date: Wed, 31 Mar 2010 14:27:44 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 7/7] Refactor target specific handling, compile vl.c only once References: <4BB397A1.2000508@codemonkey.ws> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: qemu-devel On 03/31/2010 02:19 PM, Blue Swirl wrote: > On 3/31/10, Anthony Liguori wrote: > >> On 03/27/2010 05:11 PM, Blue Swirl wrote: >> >> >>> Move target specific functions and RAM handling to arch_init.c. >>> >>> Add a flag to QEMUOptions structure to indicate for which >>> architectures the option is allowed, check the flag >>> in run time and remove conditional code in option handling. >>> >>> Now that no target dependencies remain, compile vl.c only once >>> for all targets. >>> >>> Signed-off-by: Blue Swirl >>> >>> >>> >> This causes -enable-kvm to seg fault. >> > Variable kvm_state is used but it has not been initialized. This is > because kvm_init is not called. And this happens because CONFIG_KVM is > not set by config.h when included from vl.c. > I spoke too soon before. A lot of code depends on if (kvm_enabled()) going to 0 so it's a bigger refactoring to fix this once you start compiling targets that !defined(CONFIG_KVM) Regards, Anthony Liguori