lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 15 Sep 2013 12:08:38 +0300
From:	Gleb Natapov <gleb@...hat.com>
To:	Andrew Jones <drjones@...hat.com>
Cc:	kvm@...r.kernel.org, pbonzini@...hat.com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86: kvm: introduce CONFIG_KVM_MAX_VCPUS

On Sat, Sep 14, 2013 at 02:18:49PM +0200, Andrew Jones wrote:
> Take CONFIG_KVM_MAX_VCPUS from arm32, but set the default to 255.
> 
> Signed-off-by: Andrew Jones <drjones@...hat.com>
> ---
>  arch/x86/include/asm/kvm_host.h |  5 +++--
>  arch/x86/kvm/Kconfig            | 10 ++++++++++
>  2 files changed, 13 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
> index c76ff74a98f2e..e7e9b523a8f7e 100644
> --- a/arch/x86/include/asm/kvm_host.h
> +++ b/arch/x86/include/asm/kvm_host.h
> @@ -31,8 +31,9 @@
>  #include <asm/msr-index.h>
>  #include <asm/asm.h>
>  
> -#define KVM_MAX_VCPUS 255
> -#define KVM_SOFT_MAX_VCPUS 160
> +#define KVM_MAX_VCPUS CONFIG_KVM_MAX_VCPUS
> +#define KVM_SOFT_MAX_VCPUS min(160, KVM_MAX_VCPUS)
> +
>  #define KVM_USER_MEM_SLOTS 125
>  /* memory slots that are not exposed to userspace */
>  #define KVM_PRIVATE_MEM_SLOTS 3
> diff --git a/arch/x86/kvm/Kconfig b/arch/x86/kvm/Kconfig
> index a47a3e54b964b..e9532c33527ee 100644
> --- a/arch/x86/kvm/Kconfig
> +++ b/arch/x86/kvm/Kconfig
> @@ -52,6 +52,16 @@ config KVM
>  
>  	  If unsure, say N.
>  
> +config KVM_MAX_VCPUS
> +	int "Number maximum supported virtual CPUs per VM"
> +	depends on KVM
> +	default 255
> +	help
> +	  Static number of max supported virtual CPUs per VM.
> +
> +	  Set to a lower number to save some resources. Set to a higher
> +	  number to test scalability.
> +
Maximum this can save is around 2K per VM. This is pretty insignificant
considering overall memory footprint even smallest VM has.

>  config KVM_INTEL
>  	tristate "KVM for Intel processors support"
>  	depends on KVM
> -- 
> 1.8.1.4

--
			Gleb.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ