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 37F4EC433EF for ; Wed, 17 Nov 2021 12:08:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 161FB63215 for ; Wed, 17 Nov 2021 12:08:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237169AbhKQMLD (ORCPT ); Wed, 17 Nov 2021 07:11:03 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:21184 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235644AbhKQMLA (ORCPT ); Wed, 17 Nov 2021 07:11:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1637150882; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EUAsRQ1K2L2naUKa9LkNaNxpsS38eJg7MFYq/EUQFt4=; b=VWrHgeFu7nz1shvqooJHw7Q9rPNpd/ugYQSDmWVS+QFGbB2bsHtk9Vc6QH+qsOxeEZxgiv Cr61XNW7nWuLfxGwGQ+JcphfBJIv5WlcQiJrhO0VzSa1rfYFuZh4F447+W0v4/TZyqidUP KNawGfWHpbEP9jo5tUf7IGa38AjRGcc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-450-FvmuAdXlOey1skiIYuat1g-1; Wed, 17 Nov 2021 07:07:58 -0500 X-MC-Unique: FvmuAdXlOey1skiIYuat1g-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 439731023F4E; Wed, 17 Nov 2021 12:07:56 +0000 (UTC) Received: from [10.39.192.245] (unknown [10.39.192.245]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2F8315DF56; Wed, 17 Nov 2021 12:07:43 +0000 (UTC) Message-ID: <539f71a6-f62a-c7d2-51a8-bd062a639e87@redhat.com> Date: Wed, 17 Nov 2021 13:07:41 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [PATCH v2 1/6] KVM: arm64: Cap KVM_CAP_NR_VCPUS by kvm_arm_default_max_vcpus() Content-Language: en-US To: Vitaly Kuznetsov , kvm@vger.kernel.org Cc: Sean Christopherson , Wanpeng Li , Jim Mattson , Eduardo Habkost , Marc Zyngier , 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 References: <20211116163443.88707-1-vkuznets@redhat.com> <20211116163443.88707-2-vkuznets@redhat.com> From: Paolo Bonzini In-Reply-To: <20211116163443.88707-2-vkuznets@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/16/21 17:34, Vitaly Kuznetsov wrote: > - r = num_online_cpus(); > + /* > + * ARM64 treats KVM_CAP_NR_CPUS differently from all other > + * architectures, as it does not always bound it to > + * num_online_cpus(). It should not matter much because this ^^^^^^^^^^^^^^^^^^ KVM_CAP_MAX_VCPUS (sorry for the typo in my suggestion). I'll fix it when applying. Paolo > + * is just an advisory value. > + */ > + r = min_t(unsigned int, num_online_cpus(), > + kvm_arm_default_max_vcpus());