From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [PATCH] kvm.h: __user requires compiler.h Date: Fri, 21 Mar 2008 15:30:01 -0500 Message-ID: <47E41AC9.1030003@codemonkey.ws> References: <200803121810.46055.borntraeger@de.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel@lists.sourceforge.net, Avi Kivity To: Christian Borntraeger Return-path: In-Reply-To: <200803121810.46055.borntraeger@de.ibm.com> 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 This patch breaks QEMU build when doing a 'make sync'. When you do a top-level ./configure, libkvm is built with kerneldir pointing to kvm-userspace/kernel/include. While linux/kvm.h is present there, there isn't a linux/compiler.h. The host kernelpath isn't normally part of the libkvm or QEMU build. So we have a couple options. 1) make the host kernelpath (/lib/modules/$(uname -r)/build/include) part of the libkvm/QEMU build. 2) Do something else about __user Suggestions? #1 might be a pain since there may be include conflicts between the host kernel include and kernel/include. Regards, Anthony Liguori Christian Borntraeger wrote: > include/linux/kvm.h defines struct kvm_dirty_log to > [...] > union { > void __user *dirty_bitmap; /* one bit per page */ > __u64 padding; > }; > > __user requires compiler.h to compile. Currently, this works on x86 > only coincidentally due to other include files. This patch makes > kvm.h compile in all cases. > > Signed-off-by: Christian Borntraeger > --- > include/linux/kvm.h | 1 + > 1 file changed, 1 insertion(+) > > Index: kvm/include/linux/kvm.h > =================================================================== > --- kvm.orig/include/linux/kvm.h > +++ kvm/include/linux/kvm.h > @@ -8,6 +8,7 @@ > */ > > #include > +#include > #include > #include > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/