Messages in this thread | | | Date | Mon, 19 Jan 2009 14:22:14 +0100 | From | Ingo Molnar <> | Subject | Re: [PATCH] KVM: Avoid using CONFIG_ in userspace visible headers |
| |
* Avi Kivity <avi@redhat.com> wrote:
> Ingo Molnar wrote: >> * Avi Kivity <avi@redhat.com> wrote: >> >> >>> Kconfig symbols are not available in userspace, and are not stripped by >>> headers-install. Avoid their use by adding #defines in <asm/kvm.h> to >>> suit each architecture. >>> >>> >> looks good - you will push this via the KVM tree, right? >> > > Yes. Thanks for the review.
btw., would be nice to somehow untangle consciously-exported interface definitions from kernel side bits, and standardize these feature/capability flags like __KVM_HAVE_IOAPIC, etc.
Right now we have this body of 75,000 lines of code spread out in 600+ header files that are so-called 'exported' to user-space, but 95% of that interface definition code is never being relied on by any user-space bit! They are exported due to cargo-cult mentality or due to dependencies.
It would be far better to have an explicit place for such bits, include/syscall-ABI/ or so - and not export _any_ other kernel headers. But that's a much larger project.
Ingo
| |