]> www.infradead.org Git - users/dwmw2/linux.git/commit
KVM: arm64: Cap KVM_CAP_NR_VCPUS by kvm_arm_default_max_vcpus()
authorVitaly Kuznetsov <vkuznets@redhat.com>
Tue, 16 Nov 2021 16:34:38 +0000 (17:34 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 17 Nov 2021 12:09:18 +0000 (07:09 -0500)
commit3c7bbf265ee42ee761f91794a88df1c23d15ca41
tree4bd5794b032d48125f98268464160232ea2a3e56
parent4069b8292d0855f59322eb35d878bcf58156b0c9
KVM: arm64: Cap KVM_CAP_NR_VCPUS by kvm_arm_default_max_vcpus()

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 <vkuznets@redhat.com>
Message-Id: <20211116163443.88707-2-vkuznets@redhat.com>
Acked-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/arm64/kvm/arm.c