From patchwork Mon Aug 12 19:56:30 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcelo Tosatti X-Patchwork-Id: 2843291 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4898DBF546 for ; Mon, 12 Aug 2013 19:59:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6582F20518 for ; Mon, 12 Aug 2013 19:59:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 80AF2204F4 for ; Mon, 12 Aug 2013 19:59:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753400Ab3HLT7d (ORCPT ); Mon, 12 Aug 2013 15:59:33 -0400 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 Received: from amt.cnet (vpn1-5-179.gru2.redhat.com [10.97.5.179]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r7CJxU3s023089; Mon, 12 Aug 2013 15:59:31 -0400 Received: from amt.cnet (localhost [127.0.0.1]) by amt.cnet (Postfix) with ESMTP id 26BDD10435B; Mon, 12 Aug 2013 16:59:14 -0300 (BRT) Received: (from marcelo@localhost) by amt.cnet (8.14.6/8.14.6/Submit) id r7CJxDOL010355; Mon, 12 Aug 2013 16:59:13 -0300 Message-Id: <20130812195730.079414823@redhat.com> User-Agent: quilt/0.60-1 Date: Mon, 12 Aug 2013 16:56:30 -0300 From: Marcelo Tosatti To: kvm@vger.kernel.org Cc: pbonzini@redhat.com, gleb@redhat.com, Marcelo Tosatti Subject: [uq/master patch 1/2] kvm-all.c: use recommended max vcpus limit References: <20130812195629.350634011@redhat.com> Content-Disposition: inline; filename=kvm-all-use-cap-nr-vcpus-first X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-9.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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; }