diff options
author | Geoff Levand <geoff@infradead.org> | 2013-06-06 21:02:54 -0400 |
---|---|---|
committer | Christoffer Dall <christoffer.dall@linaro.org> | 2013-06-26 13:50:05 -0400 |
commit | f2dda9d829818b055510187059cdfa4ece10c82d (patch) | |
tree | 9644cf80a75fb32131a5bba5595e478c1a49673a | |
parent | 22cfbb6d730ca2fda236b507d9fba17bf002736c (diff) |
arm/kvm: Cleanup KVM_ARM_MAX_VCPUS logic
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>
-rw-r--r-- | arch/arm/include/asm/kvm_host.h | 5 | ||||
-rw-r--r-- | arch/arm/kvm/Kconfig | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/arch/arm/include/asm/kvm_host.h b/arch/arm/include/asm/kvm_host.h index 1f3cee2e210e..7d22517d8071 100644 --- a/arch/arm/include/asm/kvm_host.h +++ b/arch/arm/include/asm/kvm_host.h | |||
@@ -25,7 +25,12 @@ | |||
25 | #include <asm/fpstate.h> | 25 | #include <asm/fpstate.h> |
26 | #include <kvm/arm_arch_timer.h> | 26 | #include <kvm/arm_arch_timer.h> |
27 | 27 | ||
28 | #if defined(CONFIG_KVM_ARM_MAX_VCPUS) | ||
28 | #define KVM_MAX_VCPUS CONFIG_KVM_ARM_MAX_VCPUS | 29 | #define KVM_MAX_VCPUS CONFIG_KVM_ARM_MAX_VCPUS |
30 | #else | ||
31 | #define KVM_MAX_VCPUS 0 | ||
32 | #endif | ||
33 | |||
29 | #define KVM_USER_MEM_SLOTS 32 | 34 | #define KVM_USER_MEM_SLOTS 32 |
30 | #define KVM_PRIVATE_MEM_SLOTS 4 | 35 | #define KVM_PRIVATE_MEM_SLOTS 4 |
31 | #define KVM_COALESCED_MMIO_PAGE_OFFSET 1 | 36 | #define KVM_COALESCED_MMIO_PAGE_OFFSET 1 |
diff --git a/arch/arm/kvm/Kconfig b/arch/arm/kvm/Kconfig index 370e1a8af6ac..49dd64e579c2 100644 --- a/arch/arm/kvm/Kconfig +++ b/arch/arm/kvm/Kconfig | |||
@@ -41,9 +41,9 @@ config KVM_ARM_HOST | |||
41 | Provides host support for ARM processors. | 41 | Provides host support for ARM processors. |
42 | 42 | ||
43 | config KVM_ARM_MAX_VCPUS | 43 | config KVM_ARM_MAX_VCPUS |
44 | int "Number maximum supported virtual CPUs per VM" if KVM_ARM_HOST | 44 | int "Number maximum supported virtual CPUs per VM" |
45 | default 4 if KVM_ARM_HOST | 45 | depends on KVM_ARM_HOST |
46 | default 0 | 46 | default 4 |
47 | help | 47 | help |
48 | Static number of max supported virtual CPUs per VM. | 48 | Static number of max supported virtual CPUs per VM. |
49 | 49 | ||