From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] kvm-userspace: fix compilation breakage when in-kernel pit is not detected Date: Fri, 11 Apr 2008 15:05:05 +0300 Message-ID: <47FF53F1.4020606@qumranet.com> References: <1207830824-1590-1-git-send-email-joerg.roedel@amd.com> <47FEE84E.30206@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel@lists.sourceforge.net To: Anthony Liguori Return-path: In-Reply-To: <47FEE84E.30206@codemonkey.ws> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces@lists.sourceforge.net Errors-To: kvm-devel-bounces@lists.sourceforge.net List-Id: kvm.vger.kernel.org Anthony Liguori wrote: > Joerg Roedel wrote: >> The compilation of kvm-userspace part fails if the in-kernel pit is not >> detected in with the following error message: >> >> pc.o: In function `pc_init1': >> /home/jroedel/src/kvm/kvm-userspace/qemu/hw/pc.c:987: undefined >> reference to `kvm_pit_init' >> collect2: ld returned 1 exit status >> >> This patch fixes this little issue. >> > > A better solution is to wrap qemu_kvm_put_in_kernel in an #ifdef > KVM_CAP_PIT so that if it isn't defined, it always returns 0. gcc > will then do the right thing. > I would like to move qemu from depending on linux/kvm.h directly. However, there is a lot of work needed to get that (including some pointless stuff like defining libkvm structures to take the place of kvm.h structures) so perhaps it is not a realistic goal. -- Any sufficiently difficult bug is indistinguishable from a feature. ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone