diff options
author | Avi Kivity <avi@qumranet.com> | 2007-12-02 03:50:06 -0500 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-01-30 10:53:16 -0500 |
commit | fb56dbb31c4738a3918db81fd24da732ce3b4ae6 (patch) | |
tree | b201bcc1dda7729045e9cf2e9ef9d281eb66d92c | |
parent | d23087847184a7417fc69bdfaa8a32834b447bef (diff) |
KVM: Export include/linux/kvm.h only if $ARCH actually supports KVM
Currently, make headers_check barfs due to <asm/kvm.h>, which <linux/kvm.h>
includes, not existing. Rather than add a zillion <asm/kvm.h>s, export kvm.h
only if the arch actually supports it.
Signed-off-by: Avi Kivity <avi@qumranet.com>
-rw-r--r-- | arch/x86/Kconfig | 1 | ||||
-rw-r--r-- | drivers/kvm/Kconfig | 7 | ||||
-rw-r--r-- | include/linux/Kbuild | 2 |
3 files changed, 7 insertions, 3 deletions
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index fb3eea3e38ee..d289cfcf92c4 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
@@ -107,6 +107,7 @@ config ARCH_SUPPORTS_OPROFILE | |||
107 | bool | 107 | bool |
108 | default y | 108 | default y |
109 | 109 | ||
110 | select HAVE_KVM | ||
110 | 111 | ||
111 | config ZONE_DMA32 | 112 | config ZONE_DMA32 |
112 | bool | 113 | bool |
diff --git a/drivers/kvm/Kconfig b/drivers/kvm/Kconfig index 656920636cb2..c83e1c9b5129 100644 --- a/drivers/kvm/Kconfig +++ b/drivers/kvm/Kconfig | |||
@@ -1,9 +1,12 @@ | |||
1 | # | 1 | # |
2 | # KVM configuration | 2 | # KVM configuration |
3 | # | 3 | # |
4 | config HAVE_KVM | ||
5 | bool | ||
6 | |||
4 | menuconfig VIRTUALIZATION | 7 | menuconfig VIRTUALIZATION |
5 | bool "Virtualization" | 8 | bool "Virtualization" |
6 | depends on X86 | 9 | depends on HAVE_KVM || X86 |
7 | default y | 10 | default y |
8 | ---help--- | 11 | ---help--- |
9 | Say Y here to get to see options for using your Linux host to run other | 12 | Say Y here to get to see options for using your Linux host to run other |
@@ -16,7 +19,7 @@ if VIRTUALIZATION | |||
16 | 19 | ||
17 | config KVM | 20 | config KVM |
18 | tristate "Kernel-based Virtual Machine (KVM) support" | 21 | tristate "Kernel-based Virtual Machine (KVM) support" |
19 | depends on X86 && EXPERIMENTAL | 22 | depends on HAVE_KVM && EXPERIMENTAL |
20 | select PREEMPT_NOTIFIERS | 23 | select PREEMPT_NOTIFIERS |
21 | select ANON_INODES | 24 | select ANON_INODES |
22 | ---help--- | 25 | ---help--- |
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index c263a69b5680..85b2482cc736 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -255,7 +255,7 @@ unifdef-y += kd.h | |||
255 | unifdef-y += kernelcapi.h | 255 | unifdef-y += kernelcapi.h |
256 | unifdef-y += kernel.h | 256 | unifdef-y += kernel.h |
257 | unifdef-y += keyboard.h | 257 | unifdef-y += keyboard.h |
258 | unifdef-y += kvm.h | 258 | unifdef-$(CONFIG_HAVE_KVM) += kvm.h |
259 | unifdef-y += llc.h | 259 | unifdef-y += llc.h |
260 | unifdef-y += loop.h | 260 | unifdef-y += loop.h |
261 | unifdef-y += lp.h | 261 | unifdef-y += lp.h |