From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] [PATCH] qemu: report issues causing the kvm probe to fail Date: Mon, 15 Dec 2008 12:30:46 +0200 Message-ID: <494631D6.3080807@redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: hollisb@us.ibm.com, kvm@vger.kernel.org To: Christian Ehrhardt Return-path: Received: from mx2.redhat.com ([66.187.237.31]:47844 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752912AbYLOKax (ORCPT ); Mon, 15 Dec 2008 05:30:53 -0500 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: Christian Ehrhardt wrote: > I ran into the issue of a failign KVM Probe of the qemu configure script three > times this week always needing "set -x", inserting an exit, masking the cleanup > trap and compiling the c file by hand until I knew what the reason is. I think > we could make easier for developers and end users. > Therefore this patch keeps the qemu style configure output which is a list of > "$Feature $Status", but extend the "no" result like "KVM Support no" with some > more information. > > There might be a lot of things going wrong with that probe and I don't want > to handle all of them, but if it is one of the known checks e.g. for > KVM_API_VERSION then we could grep/awk that out and report it. The patch > reports in case of a known case in the style > "KVM support no - (Missing KVM capability KVM_CAP_DESTROY_MEMORY_REGION_WORKS)" > > In case more than one #error is triggered it creates a comma separated list in > those brackets and in case it is something else than an #error it just reports > plain old "no". > > diff --git a/qemu/configure b/qemu/configure > --- a/qemu/configure > +++ b/qemu/configure > @@ -1037,12 +1037,14 @@ if test "$kvm" = "yes" ; then > if test "$kvm" = "yes" ; then > cat > $TMPC < #include > -#if !defined(KVM_API_VERSION) || \ > - KVM_API_VERSION < 12 || \ > - KVM_API_VERSION > 12 || \ > - !defined(KVM_CAP_USER_MEMORY) || \ > - !defined(KVM_CAP_SET_TSS_ADDR) > +#if !defined(KVM_API_VERSION) || KVM_API_VERSION < 12 || KVM_API_VERSION > 12 > #error Invalid KVM version > You might refine this a bit: if KVM_API_VERSION is not defined, most likely linux/kvm.h could not be found, so you might as well report that. > +#endif > -- error compiling committee.c: too many arguments to function