From: Avi Kivity <avi@redhat.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Mark McLoughlin <markmc@redhat.com>, kvm@vger.kernel.org
Subject: Re: [PATCH] kvm: user: include arch specific headers from $(KERNELDIR)
Date: Thu, 14 May 2009 11:02:51 +0300 [thread overview]
Message-ID: <4A0BD02B.1020009@redhat.com> (raw)
In-Reply-To: <200905132157.02633.arnd@arndb.de>
Arnd Bergmann wrote:
> On Wednesday 13 May 2009 08:32:21 Mark McLoughlin wrote:
>
>> Currently we only include $(KERNELDIR)/include in CFLAGS,
>> but we also have $(KERNELDIR)/arch/$(arch)/include or else
>> we'll get mis-matched headers.
>>
>>
>
> I think this is fundamentally wrong. User files should never directly
> access kernel headers, because they are postprocessed in various
> ways in order to get files that are valid in user space, e.g. __user
> annotations are removed.
>
There aren't the real kernel headers, just cheap copies carried in
qemu-kvm.git which have been appropriately postprocessed. We do this
since the kvm external module can run on a much older kernel, so there
is no natural place to find it headers.
> The three possible sources for kernel headers are:
>
> /usr/include
> - system provided headers, may be older than the running kernel
> /lib/modules/$(uname -r)/build/usr/include
> - user space headers for the currently running kernel
> $(KERNELDIR)/usr/include
> - user space headers from a configured kernel tree after 'make headers_install'
None of these are sufficiently up-to-date.
--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
next prev parent reply other threads:[~2009-05-14 8:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-13 8:32 [PATCH] kvm: user: include arch specific headers from $(KERNELDIR) Mark McLoughlin
2009-05-13 21:57 ` Arnd Bergmann
2009-05-14 7:52 ` Mark McLoughlin
2009-05-14 8:02 ` Avi Kivity [this message]
2009-05-14 15:49 ` Arnd Bergmann
2009-05-14 15:55 ` Avi Kivity
2009-05-14 16:07 ` Arnd Bergmann
2009-05-17 22:18 ` 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=4A0BD02B.1020009@redhat.com \
--to=avi@redhat.com \
--cc=arnd@arndb.de \
--cc=kvm@vger.kernel.org \
--cc=markmc@redhat.com \
/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.