]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
KVM: Avoid using CONFIG_ in userspace visible headers
authorAvi Kivity <avi@redhat.com>
Mon, 19 Jan 2009 12:57:52 +0000 (14:57 +0200)
committerAvi Kivity <avi@redhat.com>
Tue, 24 Mar 2009 09:03:06 +0000 (11:03 +0200)
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.

Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/include/asm/kvm.h
include/linux/kvm.h

index 54bcf2281526f508162cb17211ec5332359100b3..dc3f6cf117045ee50b2e92aa87a9b772ce8150bd 100644 (file)
@@ -15,6 +15,7 @@
 #define __KVM_HAVE_DEVICE_ASSIGNMENT
 #define __KVM_HAVE_MSI
 #define __KVM_HAVE_USER_NMI
+#define __KVM_HAVE_GUEST_DEBUG
 
 /* Architectural interrupt line count. */
 #define KVM_NR_INTERRUPTS 256
index 7a5d73a8d4fa112456fda99f8fe29da3f02f9d4e..869462ca762576399673cedf0b7133c15d3cb45a 100644 (file)
@@ -393,13 +393,13 @@ struct kvm_trace_rec {
 #ifdef __KVM_HAVE_USER_NMI
 #define KVM_CAP_USER_NMI 22
 #endif
-#if defined(CONFIG_X86)
+#ifdef __KVM_HAVE_GUEST_DEBUG
 #define KVM_CAP_SET_GUEST_DEBUG 23
 #endif
-#if defined(CONFIG_X86)
+#ifdef __KVM_HAVE_PIT
 #define KVM_CAP_REINJECT_CONTROL 24
 #endif
-#if defined(CONFIG_X86)||defined(CONFIG_IA64)
+#ifdef __KVM_HAVE_IOAPIC
 #define KVM_CAP_IRQ_ROUTING 25
 #endif