All of lore.kernel.org
 help / color / mirror / Atom feed
From: marc.zyngier@arm.com (Marc Zyngier)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] arm32: kvm: rename CONFIG_KVM_ARM_MAX_VCPUS
Date: Mon, 16 Sep 2013 09:09:27 +0100	[thread overview]
Message-ID: <5236BCB7.9080102@arm.com> (raw)
In-Reply-To: <20130915093002.GX17294@redhat.com>

On 15/09/13 10:30, Gleb Natapov wrote:
> On Sat, Sep 14, 2013 at 02:10:55PM +0200, Andrew Jones wrote:
>> Drop the _ARM_ part of the name. We can then introduce a config option
>> like this to aarch64 and other arches using the same name - allowing
>> grep to show them all. Also update the help text to describe the option
>> more completely.
>>
>> Signed-off-by: Andrew Jones <drjones@redhat.com>
>> ---
>>  arch/arm/include/asm/kvm_host.h | 4 ++--
>>  arch/arm/kvm/Kconfig            | 8 ++++----
>>  2 files changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/arch/arm/include/asm/kvm_host.h b/arch/arm/include/asm/kvm_host.h
>> index 7d22517d80711..c614d3eb176c6 100644
>> --- a/arch/arm/include/asm/kvm_host.h
>> +++ b/arch/arm/include/asm/kvm_host.h
>> @@ -25,8 +25,8 @@
>>  #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
>> +#if defined(CONFIG_KVM_MAX_VCPUS)
>> +#define KVM_MAX_VCPUS CONFIG_KVM_MAX_VCPUS
>>  #else
>>  #define KVM_MAX_VCPUS 0
>>  #endif
>> diff --git a/arch/arm/kvm/Kconfig b/arch/arm/kvm/Kconfig
>> index ebf5015508b52..de63bfccb3eb5 100644
>> --- a/arch/arm/kvm/Kconfig
>> +++ b/arch/arm/kvm/Kconfig
>> @@ -40,16 +40,16 @@ config KVM_ARM_HOST
>>  	---help---
>>  	  Provides host support for ARM processors.
>>  
>> -config KVM_ARM_MAX_VCPUS
>> +config KVM_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.
> I do no see why on ARM vcpu structure size depends on KVM_ARM_MAX_VCPUS.
> Can somebody point me to it.

There's a number of indirections, but here you go:
arch/arm/include/asm/kvm_host.h:#define KVM_MAX_VCPUS CONFIG_KVM_ARM_MAX_VCPUS

include/kvm/arm_vgic.h:#define VGIC_MAX_CPUS            KVM_MAX_VCPUS

include/kvm/arm_vgic.h:#if (VGIC_MAX_CPUS > 8)
include/kvm/arm_vgic.h: } percpu[VGIC_MAX_CPUS];
include/kvm/arm_vgic.h: u32 percpu[VGIC_MAX_CPUS][VGIC_NR_PRIVATE_IRQS / 4];
include/kvm/arm_vgic.h: u8                      irq_sgi_sources[VGIC_MAX_CPUS][VGIC_NR_SGIS];
include/kvm/arm_vgic.h: struct vgic_bitmap      irq_spi_target[VGIC_MAX_CPUS];

Basically, the GIC emulation data structures are sized on the number of VCPUs
(as well as the number of supported interrupts).

	M.
-- 
Jazz is not dead. It just smells funny...

WARNING: multiple messages have this Message-ID (diff)
From: Marc Zyngier <marc.zyngier@arm.com>
To: Gleb Natapov <gleb@redhat.com>
Cc: Andrew Jones <drjones@redhat.com>,
	"kvmarm@lists.cs.columbia.edu" <kvmarm@lists.cs.columbia.edu>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	Catalin Marinas <Catalin.Marinas@arm.com>,
	"christoffer.dall@linaro.org" <christoffer.dall@linaro.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"pbonzini@redhat.com" <pbonzini@redhat.com>,
	"linux@arm.linux.org.uk" <linux@arm.linux.org.uk>,
	Will Deacon <Will.Deacon@arm.com>
Subject: Re: [PATCH 2/3] arm32: kvm: rename CONFIG_KVM_ARM_MAX_VCPUS
Date: Mon, 16 Sep 2013 09:09:27 +0100	[thread overview]
Message-ID: <5236BCB7.9080102@arm.com> (raw)
In-Reply-To: <20130915093002.GX17294@redhat.com>

On 15/09/13 10:30, Gleb Natapov wrote:
> On Sat, Sep 14, 2013 at 02:10:55PM +0200, Andrew Jones wrote:
>> Drop the _ARM_ part of the name. We can then introduce a config option
>> like this to aarch64 and other arches using the same name - allowing
>> grep to show them all. Also update the help text to describe the option
>> more completely.
>>
>> Signed-off-by: Andrew Jones <drjones@redhat.com>
>> ---
>>  arch/arm/include/asm/kvm_host.h | 4 ++--
>>  arch/arm/kvm/Kconfig            | 8 ++++----
>>  2 files changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/arch/arm/include/asm/kvm_host.h b/arch/arm/include/asm/kvm_host.h
>> index 7d22517d80711..c614d3eb176c6 100644
>> --- a/arch/arm/include/asm/kvm_host.h
>> +++ b/arch/arm/include/asm/kvm_host.h
>> @@ -25,8 +25,8 @@
>>  #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
>> +#if defined(CONFIG_KVM_MAX_VCPUS)
>> +#define KVM_MAX_VCPUS CONFIG_KVM_MAX_VCPUS
>>  #else
>>  #define KVM_MAX_VCPUS 0
>>  #endif
>> diff --git a/arch/arm/kvm/Kconfig b/arch/arm/kvm/Kconfig
>> index ebf5015508b52..de63bfccb3eb5 100644
>> --- a/arch/arm/kvm/Kconfig
>> +++ b/arch/arm/kvm/Kconfig
>> @@ -40,16 +40,16 @@ config KVM_ARM_HOST
>>  	---help---
>>  	  Provides host support for ARM processors.
>>  
>> -config KVM_ARM_MAX_VCPUS
>> +config KVM_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.
> I do no see why on ARM vcpu structure size depends on KVM_ARM_MAX_VCPUS.
> Can somebody point me to it.

There's a number of indirections, but here you go:
arch/arm/include/asm/kvm_host.h:#define KVM_MAX_VCPUS CONFIG_KVM_ARM_MAX_VCPUS

include/kvm/arm_vgic.h:#define VGIC_MAX_CPUS            KVM_MAX_VCPUS

include/kvm/arm_vgic.h:#if (VGIC_MAX_CPUS > 8)
include/kvm/arm_vgic.h: } percpu[VGIC_MAX_CPUS];
include/kvm/arm_vgic.h: u32 percpu[VGIC_MAX_CPUS][VGIC_NR_PRIVATE_IRQS / 4];
include/kvm/arm_vgic.h: u8                      irq_sgi_sources[VGIC_MAX_CPUS][VGIC_NR_SGIS];
include/kvm/arm_vgic.h: struct vgic_bitmap      irq_spi_target[VGIC_MAX_CPUS];

Basically, the GIC emulation data structures are sized on the number of VCPUs
(as well as the number of supported interrupts).

	M.
-- 
Jazz is not dead. It just smells funny...

  reply	other threads:[~2013-09-16  8:09 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-14 12:10 [PATCH 0/3] KVM_MAX_VCPUS related changes Andrew Jones
2013-09-14 12:10 ` Andrew Jones
2013-09-14 12:10 ` Andrew Jones
2013-09-14 12:10 ` [PATCH 1/3] arm: kvm: clamp NR_VCPUS to MAX_VCPUS Andrew Jones
2013-09-14 12:10   ` Andrew Jones
2013-09-14 12:10   ` Andrew Jones
2013-09-14 12:14   ` Alexander Graf
2013-09-14 12:14     ` Alexander Graf
2013-09-14 12:22     ` Marc Zyngier
2013-09-14 12:22       ` Marc Zyngier
2013-09-14 12:23     ` Andrew Jones
2013-09-14 12:23       ` Andrew Jones
2013-09-14 12:23       ` Andrew Jones
2013-09-14 12:10 ` [PATCH 2/3] arm32: kvm: rename CONFIG_KVM_ARM_MAX_VCPUS Andrew Jones
2013-09-14 12:10   ` Andrew Jones
2013-09-14 12:10   ` Andrew Jones
2013-09-15  9:30   ` Gleb Natapov
2013-09-15  9:30     ` Gleb Natapov
2013-09-15  9:30     ` Gleb Natapov
2013-09-16  8:09     ` Marc Zyngier [this message]
2013-09-16  8:09       ` Marc Zyngier
2013-09-16  8:32       ` Gleb Natapov
2013-09-16  8:32         ` Gleb Natapov
2013-09-16  8:49         ` Marc Zyngier
2013-09-16  8:49           ` Marc Zyngier
2013-09-17 21:42   ` Christoffer Dall
2013-09-17 21:42     ` Christoffer Dall
2013-09-24 14:09   ` [PATCH v2] " Andrew Jones
2013-09-24 14:09     ` Andrew Jones
2013-09-24 14:09     ` Andrew Jones
2013-09-25 19:31     ` Christoffer Dall
2013-09-25 19:31       ` Christoffer Dall
2013-09-26  7:54       ` Andrew Jones
2013-09-26  7:54         ` Andrew Jones
2013-09-26  7:54         ` Andrew Jones
2013-09-14 12:10 ` [PATCH 3/3] aarch64: kvm: introduce CONFIG_KVM_MAX_VCPUS Andrew Jones
2013-09-14 12:10   ` Andrew Jones
2013-09-17 21:34   ` Christoffer Dall
2013-09-17 21:34     ` Christoffer Dall
2013-09-18  6:21     ` Gleb Natapov
2013-09-18  6:21       ` Gleb Natapov

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=5236BCB7.9080102@arm.com \
    --to=marc.zyngier@arm.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.