From mboxrd@z Thu Jan 1 00:00:00 1970 From: Glauber Costa Subject: Re: [PATCH 2/2] fix compilation with --disable-kvm Date: Thu, 2 Oct 2008 10:46:54 -0300 Message-ID: <20081002134654.GD23063@poweredge.glommer> References: <1222951797-9717-1-git-send-email-glommer@redhat.com> <1222951797-9717-3-git-send-email-glommer@redhat.com> <48E4CFEA.7060906@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, aliguori@us.ibm.com To: Avi Kivity Return-path: Received: from mx2.redhat.com ([66.187.237.31]:59683 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753557AbYJBNvH (ORCPT ); Thu, 2 Oct 2008 09:51:07 -0400 Content-Disposition: inline In-Reply-To: <48E4CFEA.7060906@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, Oct 02, 2008 at 04:43:06PM +0300, Avi Kivity wrote: > Glauber Costa wrote: >> - kvm_save_registers(mon_cpu); >> + if (kvm_enabled()) >> + kvm_save_registers(mon_cpu); >> > > If I'm not mistaken, this relies on the optimizer to remove the call to > kvm_save_registers(). Compilation with -O0 will break. > > I think a better solution is to have kvm_save_registers() contain the > kvm_enabled() check, and also be defined to an empty function if kvm is > disabled at compile time. ok master. Will redo. > > -- > error compiling committee.c: too many arguments to function >