Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AC0EFC433FE for ; Wed, 17 Nov 2021 09:14:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8E3B561423 for ; Wed, 17 Nov 2021 09:14:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234872AbhKQJRE (ORCPT ); Wed, 17 Nov 2021 04:17:04 -0500 Received: from mail.kernel.org ([198.145.29.99]:53924 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234868AbhKQJQ4 (ORCPT ); Wed, 17 Nov 2021 04:16:56 -0500 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 338D761875; Wed, 17 Nov 2021 09:13:58 +0000 (UTC) Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mnH0t-00625B-S9; Wed, 17 Nov 2021 09:13:56 +0000 Date: Wed, 17 Nov 2021 09:13:55 +0000 Message-ID: <87zgq36t64.wl-maz@kernel.org> From: Marc Zyngier To: Vitaly Kuznetsov Cc: kvm@vger.kernel.org, Paolo Bonzini , Sean Christopherson , Wanpeng Li , Jim Mattson , Eduardo Habkost , Andrew Jones , Huacai Chen , Aleksandar Markovic , Anup Patel , Paul Mackerras , Michael Ellerman , Christian Borntraeger , Janosch Frank , kvm-ppc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/6] KVM: arm64: Cap KVM_CAP_NR_VCPUS by kvm_arm_default_max_vcpus() In-Reply-To: <20211116163443.88707-2-vkuznets@redhat.com> References: <20211116163443.88707-1-vkuznets@redhat.com> <20211116163443.88707-2-vkuznets@redhat.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: vkuznets@redhat.com, kvm@vger.kernel.org, pbonzini@redhat.com, seanjc@google.com, wanpengli@tencent.com, jmattson@google.com, ehabkost@redhat.com, drjones@redhat.com, chenhuacai@kernel.org, aleksandar.qemu.devel@gmail.com, anup.patel@wdc.com, paulus@ozlabs.org, mpe@ellerman.id.au, borntraeger@de.ibm.com, frankja@linux.ibm.com, kvm-ppc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 16 Nov 2021 16:34:38 +0000, Vitaly Kuznetsov wrote: > > Generally, it doesn't make sense to return the recommended maximum number > of vCPUs which exceeds the maximum possible number of vCPUs. > > Note: ARM64 is special as the value returned by KVM_CAP_MAX_VCPUS differs > depending on whether it is a system-wide ioctl or a per-VM one. Previously, > KVM_CAP_NR_VCPUS didn't have this difference and it seems preferable to > keep the status quo. Cap KVM_CAP_NR_VCPUS by kvm_arm_default_max_vcpus() > which is what gets returned by system-wide KVM_CAP_MAX_VCPUS. > > Signed-off-by: Vitaly Kuznetsov Acked-by: Marc Zyngier M. -- Without deviation from the norm, progress is not possible.