repository: /home/avi/kvm/linux-2.6
branch: master
commit a393444c97f6d7355a6d7d6d7aeb80f1e72472b1
Author: Avi Kivity <[EMAIL PROTECTED]>
Date:   Sun Dec 2 10:50:06 2007 +0200

    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 <[EMAIL PROTECTED]>

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 368864d..eded44e 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -112,6 +112,9 @@ config GENERIC_TIME_VSYSCALL
        bool
        default X86_64
 
+config ARCH_SUPPORTS_KVM
+       bool
+       default y
 
 
 
diff --git a/drivers/kvm/Kconfig b/drivers/kvm/Kconfig
index 6569206..4086080 100644
--- a/drivers/kvm/Kconfig
+++ b/drivers/kvm/Kconfig
@@ -3,7 +3,7 @@
 #
 menuconfig VIRTUALIZATION
        bool "Virtualization"
-       depends on X86
+       depends on ARCH_SUPPORTS_KVM || X86
        default y
        ---help---
          Say Y here to get to see options for using your Linux host to run 
other
@@ -16,7 +16,7 @@ if VIRTUALIZATION
 
 config KVM
        tristate "Kernel-based Virtual Machine (KVM) support"
-       depends on X86 && EXPERIMENTAL
+       depends on ARCH_SUPPORTS_KVM && EXPERIMENTAL
        select PREEMPT_NOTIFIERS
        select ANON_INODES
        ---help---
diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index 105c5d6..397197f 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -254,7 +254,7 @@ unifdef-y += kd.h
 unifdef-y += kernelcapi.h
 unifdef-y += kernel.h
 unifdef-y += keyboard.h
-unifdef-y += kvm.h
+unifdef-$(CONFIG_ARCH_SUPPORTS_KVM) += kvm.h
 unifdef-y += llc.h
 unifdef-y += loop.h
 unifdef-y += lp.h

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
kvm-commits mailing list
kvm-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-commits

Reply via email to