From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [uq/master patch 2/2] kvm-all.c: max_cpus should not exceed KVM vcpu limit Date: Tue, 20 Aug 2013 18:44:18 +0200 Message-ID: <52139CE2.6020604@redhat.com> References: <20130812195629.350634011@redhat.com> <20130812195730.363325196@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, gleb@redhat.com To: Marcelo Tosatti Return-path: Received: from mail-wi0-f177.google.com ([209.85.212.177]:46033 "EHLO mail-wi0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751278Ab3HTQpB (ORCPT ); Tue, 20 Aug 2013 12:45:01 -0400 Received: by mail-wi0-f177.google.com with SMTP id hq12so461462wib.10 for ; Tue, 20 Aug 2013 09:45:00 -0700 (PDT) In-Reply-To: <20130812195730.363325196@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Il 12/08/2013 21:56, Marcelo Tosatti ha scritto: > maxcpus, which specifies the maximum number of hotpluggable CPUs, > should not exceed KVM's vcpu limit. > > Signed-off-by: Marcelo Tosatti > > Index: qemu/kvm-all.c > =================================================================== > --- qemu.orig/kvm-all.c > +++ qemu/kvm-all.c > @@ -1391,6 +1391,13 @@ int kvm_init(void) > goto err; > } > > + if (max_cpus > max_vcpus) { > + ret = -EINVAL; > + fprintf(stderr, "Number of max_cpus requested (%d) exceeds max cpus " > + "supported by KVM (%d)\n", max_cpus, max_vcpus); > + goto err; > + } > + > s->vmfd = kvm_ioctl(s, KVM_CREATE_VM, 0); > if (s->vmfd < 0) { > #ifdef TARGET_S390X > > > -- > 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 > I applied this patch to uq/master. Thanks, Paolo