Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753904AbdHUPwH (ORCPT ); Mon, 21 Aug 2017 11:52:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55714 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753245AbdHUPwG (ORCPT ); Mon, 21 Aug 2017 11:52:06 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 10C617E430 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=rkrcmar@redhat.com Date: Mon, 21 Aug 2017 17:52:00 +0200 From: Radim =?utf-8?B?S3LEjW3DocWZ?= To: Lan Tianyu Cc: pbonzini@redhat.com, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH V2] KVM/x86: Increase max vcpu number to 8192 Message-ID: <20170821155200.GA17079@flask> References: <1502844203-10556-1-git-send-email-tianyu.lan@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1502844203-10556-1-git-send-email-tianyu.lan@intel.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Mon, 21 Aug 2017 15:52:06 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 901 Lines: 27 2017-08-15 20:43-0400, Lan Tianyu: > For HPC usage case, it will create a huge VM with vcpus number as same as host > cpus and this requires more vcpus support in a single VM. This patch is to > increase max vcpu number from 288 to 8192 which is current default maximum cpu > number for Linux kernel. > > Signed-off-by: Lan Tianyu > --- > diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h > @@ -35,7 +35,7 @@ > #include > #include > > -#define KVM_MAX_VCPUS 288 > +#define KVM_MAX_VCPUS 8192 > #define KVM_SOFT_MAX_VCPUS 240 > #define KVM_MAX_VCPU_ID 1023 We will also need to raise KVM_MAX_VCPU_ID to actually allow that many VCPUs. If I count correctly, it is impossible to have ID bigger than this: #define KVM_MAX_VCPU_ID (KVM_MAX_VCPUS * 4) (And we can also use NR_CPUS instead of 8192.) Thanks.