From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nxkke-0001uS-6F for qemu-devel@nongnu.org; Fri, 02 Apr 2010 13:33:48 -0400 Received: from [140.186.70.92] (port=51300 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nxkkc-0001tk-PC for qemu-devel@nongnu.org; Fri, 02 Apr 2010 13:33:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nxkka-0004R6-1E for qemu-devel@nongnu.org; Fri, 02 Apr 2010 13:33:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33384) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NxkkZ-0004Qm-QA for qemu-devel@nongnu.org; Fri, 02 Apr 2010 13:33:44 -0400 Message-ID: <4BB62A74.6090109@redhat.com> Date: Fri, 02 Apr 2010 19:33:40 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1270227919-31031-1-git-send-email-pbonzini@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH] provide a stub version of kvm-all.c if !CONFIG_KVM List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: qemu-devel@nongnu.org On 04/02/2010 07:29 PM, Blue Swirl wrote: > Could you stub also kvm_init? It is stubbed, but it returns ENOSYS: +int kvm_init(int smp_cpus) +{ + return -ENOSYS; +} + and in fact I'm relying this to remove this: if (!(kvm_available())) { printf("Option %s not supported for this target\n", popt->name); exit(1); } and instead looking for an error when I call kvm_init. I don't see why kvm_init should be called if not passing -enable-kvm (which is kvm_allowed). > Then this part would be simpler because > you can call unconditionally kvm_init. I guess there would be no need > to export kvm_allowed for !CONFIG_KVM case. I don't understand what you mean. If this doesn't clarify enough, feel free to pick up the patch and tweak it; I'm not going to spend much time on QEMU for a while. Paolo