From: anup.patel@linaro.org (Anup Patel)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH RESEND] arm64: KVM: Add Kconfig option for max VCPUs per-Guest
Date: Thu, 12 Dec 2013 21:42:22 +0530 [thread overview]
Message-ID: <1386864747-29006-1-git-send-email-anup.patel@linaro.org> (raw)
Current max VCPUs per-Guest is set to 4 which is preventing
us from creating a Guest (or VM) with 8 VCPUs on Host (e.g.
X-Gene Storm SOC) with 8 Host CPUs.
The correct value of max VCPUs per-Guest should be same as
the max CPUs supported by GICv2 which is 8 but, increasing
value of max VCPUs per-Guest can make things slower hence
we add Kconfig option to let KVM users select appropriate
max VCPUs per-Guest.
Signed-off-by: Anup Patel <anup.patel@linaro.org>
Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar@linaro.org>
---
arch/arm64/include/asm/kvm_host.h | 7 ++++++-
arch/arm64/kvm/Kconfig | 11 +++++++++++
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h
index 5d85a02..0a1d697 100644
--- a/arch/arm64/include/asm/kvm_host.h
+++ b/arch/arm64/include/asm/kvm_host.h
@@ -26,7 +26,12 @@
#include <asm/kvm_asm.h>
#include <asm/kvm_mmio.h>
-#define KVM_MAX_VCPUS 4
+#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
diff --git a/arch/arm64/kvm/Kconfig b/arch/arm64/kvm/Kconfig
index 4480ab3..8ba85e9 100644
--- a/arch/arm64/kvm/Kconfig
+++ b/arch/arm64/kvm/Kconfig
@@ -36,6 +36,17 @@ config KVM_ARM_HOST
---help---
Provides host support for ARM processors.
+config KVM_ARM_MAX_VCPUS
+ 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.
+
+ If you choose a high number, the vcpu structures will be quite
+ large, so only choose a reasonable number that you expect to
+ actually use.
+
config KVM_ARM_VGIC
bool
depends on KVM_ARM_HOST && OF
--
1.7.9.5
next reply other threads:[~2013-12-12 16:12 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-12 16:12 Anup Patel [this message]
2013-12-12 16:12 ` [PATCH] arm64: KVM: Force undefined exception for Guest SMC intructions Anup Patel
2013-12-13 17:36 ` Marc Zyngier
2013-12-13 19:16 ` Christoffer Dall
2013-12-12 16:12 ` [PATCH] KVM: Documentation: Fix typo for KVM_ARM_VCPU_INIT ioctl Anup Patel
2013-12-13 19:18 ` Christoffer Dall
2013-12-12 16:12 ` [PATCH v2 0/2] PSCI system off and reset for KVM ARM/ARM64 Anup Patel
2013-12-13 19:19 ` Christoffer Dall
2013-12-12 16:12 ` [PATCH v2 1/2] KVM: Add KVM_EXIT_SYSTEM_EVENT to user space API header Anup Patel
2013-12-13 19:22 ` Christoffer Dall
2013-12-12 16:12 ` [PATCH v2 2/2] ARM/ARM64: KVM: Forward PSCI SYSTEM_OFF and SYSTEM_RESET to user space Anup Patel
2013-12-13 20:08 ` Christoffer Dall
2013-12-14 13:24 ` Anup Patel
2013-12-14 19:28 ` Christoffer Dall
2013-12-13 17:35 ` [PATCH RESEND] arm64: KVM: Add Kconfig option for max VCPUs per-Guest Marc Zyngier
2013-12-13 19:17 ` Christoffer Dall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1386864747-29006-1-git-send-email-anup.patel@linaro.org \
--to=anup.patel@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).