[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ff2ab085-bde9-5d88-e8ce-aa92c165361a@redhat.com>
Date: Fri, 12 Nov 2021 11:51:54 +0100
From: Paolo Bonzini <pbonzini@...hat.com>
To: Andrew Jones <drjones@...hat.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>
Cc: Marc Zyngier <maz@...nel.org>, kvm@...r.kernel.org,
Sean Christopherson <seanjc@...gle.com>,
Wanpeng Li <wanpengli@...cent.com>,
Jim Mattson <jmattson@...gle.com>,
Eduardo Habkost <ehabkost@...hat.com>,
Huacai Chen <chenhuacai@...nel.org>,
Aleksandar Markovic <aleksandar.qemu.devel@...il.com>,
Anup Patel <anup.patel@....com>,
Paul Mackerras <paulus@...abs.org>,
Michael Ellerman <mpe@...erman.id.au>, kvm-ppc@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-mips@...r.kernel.org,
kvm-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/5] KVM: arm64: Cap KVM_CAP_NR_VCPUS by KVM_CAP_MAX_VCPUS
On 11/12/21 11:38, Andrew Jones wrote:
>>
>> I'd like KVM to be consistent across architectures and have the same
>> (similar) meaning for KVM_CAP_NR_VCPUS.
> KVM_CAP_NR_VCPUS seems pretty useless if we just want to tell userspace
> the same thing it can get with _SC_NPROCESSORS_ONLN. In fact, if userspace
> knows something we don't about the future onlining of some pcpus, then
> maybe userspace would prefer to check _SC_NPROCESSORS_CONF.
It's the same for most architectures, but for example PPC has to take
into account the handling of threads, which can exist while the VMs run
but not in the host. So KVM_CAP_NR_VCPUS on PPC is _SC_NPROCESSORS_CONF
times the number of threads per core.
If you don't count PPC (not sure about s390), it _is_ pretty useless indeed.
Paolo
Powered by blists - more mailing lists