From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LVVm2-0007dS-OJ for qemu-devel@nongnu.org; Fri, 06 Feb 2009 13:49:58 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LVVm2-0007d8-5t for qemu-devel@nongnu.org; Fri, 06 Feb 2009 13:49:58 -0500 Received: from [199.232.76.173] (port=35272 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LVVm2-0007d5-1Z for qemu-devel@nongnu.org; Fri, 06 Feb 2009 13:49:58 -0500 Received: from mx2.redhat.com ([66.187.237.31]:57691) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LVVm1-0002wW-HY for qemu-devel@nongnu.org; Fri, 06 Feb 2009 13:49:57 -0500 Date: Fri, 6 Feb 2009 16:53:00 -0200 From: Glauber Costa Message-ID: <20090206185300.GA31468@poweredge.glommer> References: <1233848107-9331-1-git-send-email-glommer@redhat.com> <1233848107-9331-2-git-send-email-glommer@redhat.com> <1233848107-9331-3-git-send-email-glommer@redhat.com> <498C857A.5040000@us.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <498C857A.5040000@us.ibm.com> Subject: [Qemu-devel] Re: [PATCH 2/2] expose kvm pv features Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org On Fri, Feb 06, 2009 at 12:46:18PM -0600, Anthony Liguori wrote: > Glauber Costa wrote: >> expose kvm paravirtual features into cpuid. This enables >> the use of kvmclock in qemu guests. (and all the other >> features too). >> >> Signed-off-by: Glauber Costa >> --- >> kvm.h | 5 +++++ >> target-i386/kvm.c | 29 +++++++++++++++++++++++++++++ >> 2 files changed, 34 insertions(+), 0 deletions(-) >> >> diff --git a/kvm.h b/kvm.h >> index efce145..49a2653 100644 >> --- a/kvm.h >> +++ b/kvm.h >> @@ -17,6 +17,8 @@ >> #include "config.h" >> >> #ifdef CONFIG_KVM >> +#include >> +#include >> extern int kvm_allowed; >> > > This breaks the build in an admittedly subtle way. kvm.h is included in > various c files throughout QEMU. However, in Makefile.target, we have: for the record, it wfm ;-) > > kvm.o: CFLAGS+=$(KVM_CFLAGS) > kvm-all.o: CFLAGS+=$(KVM_CFLAGS) > > And KVM_CFLAGS contains flags derived from --kerneldir. But now you're > relying on all C files being able to pull in kernel headers. yeah, agreed. > > Looking at the patch, why put this includes in kvm.h at all? You mean we should put them somewhere else, or not put them at all? We need the headers to exist since we'll be dealing with capabilities and feature bits that kvm defines. But given this problem, they can go fine in kvm.c