From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NyUKE-0000rN-Ky for qemu-devel@nongnu.org; Sun, 04 Apr 2010 14:13:34 -0400 Received: from [140.186.70.92] (port=59051 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NyUKC-0000om-NN for qemu-devel@nongnu.org; Sun, 04 Apr 2010 14:13:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NyUKA-0003U4-EU for qemu-devel@nongnu.org; Sun, 04 Apr 2010 14:13:32 -0400 Received: from mail-bw0-f218.google.com ([209.85.218.218]:40918) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NyUK9-0003Tg-UP for qemu-devel@nongnu.org; Sun, 04 Apr 2010 14:13:30 -0400 Received: by bwz10 with SMTP id 10so4132937bwz.2 for ; Sun, 04 Apr 2010 11:13:29 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <4BB8D6C6.8010403@redhat.com> Date: Sun, 04 Apr 2010 20:13:26 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1270227919-31031-1-git-send-email-pbonzini@redhat.com> <4BB62A74.6090109@redhat.com> <4BB63869.9090301@redhat.com> <4BB70490.6000506@redhat.com> <4BB83BC4.5040005@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 >>> The reason is to avoid including kvm.h by vl.c. >> >> But that's not a problem, kvm.h can be included by compiled-once files; >> that was the reason to introduce the stubs in the first place. kvm_* should >> be declared in kvm.h. > > That can't be safe because CONFIG_KVM will not be defined for files > compiled once. So even with the stubs, those files would use inlined > stubs where they shouldn't. 1) Stubs are linked, not inlined. 2) vl.c does not use kvm_enabled 3) even if it did, it is defined like this after my patch: #if defined CONFIG_KVM || !defined NEED_CPU_H #define kvm_enabled() (kvm_allowed) #else #define kvm_enabled() (0) #endif Paolo