From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LgLzE-0005KP-11 for qemu-devel@nongnu.org; Sun, 08 Mar 2009 12:36:24 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LgLzC-0005IW-5r for qemu-devel@nongnu.org; Sun, 08 Mar 2009 12:36:23 -0400 Received: from [199.232.76.173] (port=35140 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LgLzB-0005IC-Q1 for qemu-devel@nongnu.org; Sun, 08 Mar 2009 12:36:21 -0400 Received: from mail-bw0-f171.google.com ([209.85.218.171]:40055) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LgLzB-0004gS-BJ for qemu-devel@nongnu.org; Sun, 08 Mar 2009 12:36:21 -0400 Received: by bwz19 with SMTP id 19so889792bwz.34 for ; Sun, 08 Mar 2009 09:36:20 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <49B3F0F5.8020202@redhat.com> References: <49B3EAA8.6050900@web.de> <49B3EFDC.8050205@redhat.com> <49B3F0F5.8020202@redhat.com> Date: Sun, 8 Mar 2009 18:36:19 +0200 Message-ID: Subject: Re: [Qemu-devel] Re: [6684] Fix "info registers" under kvm. From: Blue Swirl Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On 3/8/09, Avi Kivity wrote: > Avi Kivity wrote: > > > Jan Kiszka wrote: > > > > > I'm just still waiting for a reply from Anthony on how to embed best all > > > the "if (kvm_enabled()) foo();" patterns [2]. That would also allow us > > > to merge gdbstub support for upstream kvm. > > > > > > > > > > > > > Wouldn't 'if (!kvm_enabled()) return;' inside the callees suffice? > > > > Rather, > > static inline void kvm_foo(...) > { > if (!kvm_enabled()) { > return; > } > > #ifdef CONFIG_KVM > kvm_do_foo(); > #endif > > } kvm_foo may then be unused and produce warnings unless also hidden with #ifdef CONFIG_KVM.