From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: [uq/master patch 1/2] kvm-all.c: use recommended max vcpus limit Date: Mon, 12 Aug 2013 16:56:30 -0300 Message-ID: <20130812195730.079414823@redhat.com> References: <20130812195629.350634011@redhat.com> Cc: pbonzini@redhat.com, gleb@redhat.com, Marcelo Tosatti To: kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:13051 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752086Ab3HLT7c (ORCPT ); Mon, 12 Aug 2013 15:59:32 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r7CJxWGk023010 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 12 Aug 2013 15:59:32 -0400 Content-Disposition: inline; filename=kvm-all-use-cap-nr-vcpus-first Sender: kvm-owner@vger.kernel.org List-ID: Commit 8c3ba334f8588e1d5099f8602cf01897720e0eca, "KVM: x86: Raise the hard VCPU count limit", upstream introduced the notion of a recommended vcpu max limit. Switch the order so the recommended vcpu max limit is used instead of the actual max vcpu limit. Signed-off-by: Marcelo Tosatti Index: qemu/kvm-all.c =================================================================== --- qemu.orig/kvm-all.c +++ qemu/kvm-all.c @@ -1321,11 +1321,11 @@ static int kvm_max_vcpus(KVMState *s) * procedure from the kernel API documentation to cope with * older kernels that may be missing capabilities. */ - ret = kvm_check_extension(s, KVM_CAP_MAX_VCPUS); + ret = kvm_check_extension(s, KVM_CAP_NR_VCPUS); if (ret) { return ret; } - ret = kvm_check_extension(s, KVM_CAP_NR_VCPUS); + ret = kvm_check_extension(s, KVM_CAP_MAX_VCPUS); if (ret) { return ret; }