All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: kvm-devel@lists.sourceforge.net, Avi Kivity <avi@qumranet.com>
Subject: Re: [PATCH] kvm.h: __user requires compiler.h
Date: Fri, 21 Mar 2008 15:30:01 -0500	[thread overview]
Message-ID: <47E41AC9.1030003@codemonkey.ws> (raw)
In-Reply-To: <200803121810.46055.borntraeger@de.ibm.com>

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 <borntraeger@de.ibm.com>
> ---
>  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 <asm/types.h>
> +#include <linux/compiler.h>
>  #include <linux/ioctl.h>
>  #include <asm/kvm.h>
>  
> 
> 
> 
> -------------------------------------------------------------------------
> 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/

  parent reply	other threads:[~2008-03-21 20:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-12 17:10 [PATCH] kvm.h: __user requires compiler.h Christian Borntraeger
2008-03-18  6:50 ` Avi Kivity
2008-03-21 20:30 ` Anthony Liguori [this message]
2008-03-23  8:42   ` Avi Kivity
2008-03-24 19:46   ` Christian Borntraeger
2008-03-24 20:04     ` Avi Kivity
2008-03-25 15:42       ` Christian Borntraeger
2008-03-25 16:23         ` Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47E41AC9.1030003@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=avi@qumranet.com \
    --cc=borntraeger@de.ibm.com \
    --cc=kvm-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.