Skip to content

Commit

Permalink
KVM: Export include/linux/kvm.h only if $ARCH actually supports KVM
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Avi Kivity committed Jan 30, 2008
1 parent d230878 commit fb56dbb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions arch/x86/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ config ARCH_SUPPORTS_OPROFILE
bool
default y

select HAVE_KVM

config ZONE_DMA32
bool
Expand Down
7 changes: 5 additions & 2 deletions drivers/kvm/Kconfig
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#
# KVM configuration
#
config HAVE_KVM
bool

menuconfig VIRTUALIZATION
bool "Virtualization"
depends on X86
depends on HAVE_KVM || X86
default y
---help---
Say Y here to get to see options for using your Linux host to run other
Expand All @@ -16,7 +19,7 @@ if VIRTUALIZATION

config KVM
tristate "Kernel-based Virtual Machine (KVM) support"
depends on X86 && EXPERIMENTAL
depends on HAVE_KVM && EXPERIMENTAL
select PREEMPT_NOTIFIERS
select ANON_INODES
---help---
Expand Down
2 changes: 1 addition & 1 deletion include/linux/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ unifdef-y += kd.h
unifdef-y += kernelcapi.h
unifdef-y += kernel.h
unifdef-y += keyboard.h
unifdef-y += kvm.h
unifdef-$(CONFIG_HAVE_KVM) += kvm.h
unifdef-y += llc.h
unifdef-y += loop.h
unifdef-y += lp.h
Expand Down

0 comments on commit fb56dbb

Please sign in to comment.