From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 2/2] fix compilation with --disable-kvm Date: Thu, 02 Oct 2008 16:55:01 +0300 Message-ID: <48E4D2B5.4010608@redhat.com> References: <1222951797-9717-1-git-send-email-glommer@redhat.com> <1222951797-9717-3-git-send-email-glommer@redhat.com> <48E4CFEA.7060906@redhat.com> <20081002134654.GD23063@poweredge.glommer> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, aliguori@us.ibm.com To: Glauber Costa Return-path: Received: from mx2.redhat.com ([66.187.237.31]:48384 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752669AbYJBNzL (ORCPT ); Thu, 2 Oct 2008 09:55:11 -0400 In-Reply-To: <20081002134654.GD23063@poweredge.glommer> Sender: kvm-owner@vger.kernel.org List-ID: Glauber Costa wrote: > 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. > I applied it already (since it fixes an issue), so base it on kvm-userspace.git (once I push). -- error compiling committee.c: too many arguments to function