From nobody Sat May 4 00:40:11 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 152767284094571.5624023857431; Wed, 30 May 2018 02:34:00 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D6578C071887; Wed, 30 May 2018 09:33:58 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9810C981B4; Wed, 30 May 2018 09:33:58 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 39E241800C9D; Wed, 30 May 2018 09:33:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w4U9XtsT031667 for ; Wed, 30 May 2018 05:33:55 -0400 Received: by smtp.corp.redhat.com (Postfix) id 79359171D6; Wed, 30 May 2018 09:33:54 +0000 (UTC) Received: from moo.home.annexia.org (ovpn-117-157.ams2.redhat.com [10.36.117.157]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0790E5C20C; Wed, 30 May 2018 09:33:52 +0000 (UTC) From: "Richard W.M. Jones" To: libvir-list@redhat.com Date: Wed, 30 May 2018 10:33:45 +0100 Message-Id: <20180530093345.19562-2-rjones@redhat.com> In-Reply-To: <20180530093345.19562-1-rjones@redhat.com> References: <20180530093345.19562-1-rjones@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: ptoscano@redhat.com Subject: [libvirt] [PATCH] vmx: Remove check that numvcpus has to be an even number. X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 30 May 2018 09:33:59 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" https://bugzilla.redhat.com/show_bug.cgi?id=3D1584091 It is possible to create a VMware guest with an odd number of vCPUs, but such guests cannot be accessed by libvirt because of this unnecessary check. I retained the sanity-check that numvcpus must be >=3D 1. Signed-off-by: Richard W.M. Jones --- src/vmx/vmx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c index bdc27b15b0..456bbaf190 100644 --- a/src/vmx/vmx.c +++ b/src/vmx/vmx.c @@ -1506,10 +1506,10 @@ virVMXParseConfig(virVMXContext *ctx, if (virVMXGetConfigLong(conf, "numvcpus", &numvcpus, 1, true) < 0) goto cleanup; =20 - if (numvcpus <=3D 0 || (numvcpus % 2 !=3D 0 && numvcpus !=3D 1)) { + if (numvcpus <=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Expecting VMX entry 'numvcpus' to be an unsigned= " - "integer (1 or a multiple of 2) but found %lld"),= numvcpus); + _("Expecting VMX entry 'numvcpus' to be a positive " + "integer >=3D 1, but found %lld"), numvcpus); goto cleanup; } =20 --=20 2.16.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list