]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
arm/kvm: Cleanup KVM_ARM_MAX_VCPUS logic
authorGeoff Levand <geoff@infradead.org>
Fri, 7 Jun 2013 01:02:54 +0000 (18:02 -0700)
committerChristoffer Dall <christoffer.dall@linaro.org>
Wed, 26 Jun 2013 17:50:05 +0000 (10:50 -0700)
Commit d21a1c83c7595e387545632e44cd7797b76e19cc (ARM: KVM: define KVM_ARM_MAX_VCPUS
unconditionally) changed the Kconfig logic for KVM_ARM_MAX_VCPUS to work around a
build error arising from the use of KVM_ARM_MAX_VCPUS when CONFIG_KVM=n.  The
resulting Kconfig logic is a bit awkward and leaves a KVM_ARM_MAX_VCPUS always
defined in the kernel config file.

This change reverts the Kconfig logic back and adds a simple preprocessor
conditional in kvm_host.h to handle when CONFIG_KVM_ARM_MAX_VCPUS is undefined.

Signed-off-by: Geoff Levand <geoff@infradead.org>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
arch/arm/include/asm/kvm_host.h
arch/arm/kvm/Kconfig

index 1f3cee2e210e6134ce2da44272fd5324ada92ae8..7d22517d8071192e467a6653a177ab08742d2650 100644 (file)
 #include <asm/fpstate.h>
 #include <kvm/arm_arch_timer.h>
 
+#if defined(CONFIG_KVM_ARM_MAX_VCPUS)
 #define KVM_MAX_VCPUS CONFIG_KVM_ARM_MAX_VCPUS
+#else
+#define KVM_MAX_VCPUS 0
+#endif
+
 #define KVM_USER_MEM_SLOTS 32
 #define KVM_PRIVATE_MEM_SLOTS 4
 #define KVM_COALESCED_MMIO_PAGE_OFFSET 1
index 370e1a8af6ac0663974b2fdc186dd05c7f3b996a..49dd64e579c2da533b1cd43235aef3a9d286b909 100644 (file)
@@ -41,9 +41,9 @@ config KVM_ARM_HOST
          Provides host support for ARM processors.
 
 config KVM_ARM_MAX_VCPUS
-       int "Number maximum supported virtual CPUs per VM" if KVM_ARM_HOST
-       default 4 if KVM_ARM_HOST
-       default 0
+       int "Number maximum supported virtual CPUs per VM"
+       depends on KVM_ARM_HOST
+       default 4
        help
          Static number of max supported virtual CPUs per VM.