Messages in this thread | | | Date | Mon, 19 Jan 2009 15:31:08 +0200 | From | Avi Kivity <> | Subject | Re: [PATCH] KVM: Avoid using CONFIG_ in userspace visible headers |
| |
Ingo Molnar wrote: > 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. >
Yes, kvm has non-interface stuff in <linux/kvm_host.h>, so there's at least some separation. All of <linux/kvm.h> is needed by userspace.
What's more painful to me in this area is advertising what's exported. Right now userspace has to rely on the kernel version to see what features are supported, but that doesn't work if a feature is backported or removed. KVM has KVM_CHECK_EXTENSION which I'd love to see standardized.
-- error compiling committee.c: too many arguments to function
| |