From nobody Sun May 12 13:45:49 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1632235851; cv=none; d=zohomail.com; s=zohoarc; b=HUK1X9fMSENklWchTFIkBUloKIHugkKl1LOY0KozqORgBpAxgVP099yLYhmf5LjyQm6l9br536KMUOb8p1FesMJShCkm0Xi4yb/YYp9NoG+LAOLHm5nd4ez+fw2lT0EXG5zsWcfnxRcV/UrzLHETiVXXrJO/M+w4fvUZJKNARTA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1632235851; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=J3GBpqNJHjxvmWX+B82xptsDC/JLwx6ev2moQnT4i60=; b=l3KF9RGJqKTPYKT3I4bZGYoG74iZTzCx4Oktsgd4A8zIpzAcJUHqoWdK/Lj2OJHKDO8ejukH5OzON2Uivpg/B0dbgmq01jWtj0d4LCX7jkPuM5C8d6CLtpbJF8zg6OYmo9Rmm9CIvCAcwdp4lP6P2ZdjPygtSBW6mNdaFnArpds= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1632235851532253.2427664191208; Tue, 21 Sep 2021 07:50:51 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-302-Vm5PQxP2OXSV_PcIbDz9zQ-1; Tue, 21 Sep 2021 10:50:48 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9D614100CCC0; Tue, 21 Sep 2021 14:50:43 +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 E69216B544; Tue, 21 Sep 2021 14:50:42 +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 EC7681806D00; Tue, 21 Sep 2021 14:50:40 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 18LEodZY009979 for ; Tue, 21 Sep 2021 10:50:39 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7041D1865D; Tue, 21 Sep 2021 14:50:39 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.93]) by smtp.corp.redhat.com (Postfix) with ESMTP id C85546B545; Tue, 21 Sep 2021 14:50:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1632235850; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=J3GBpqNJHjxvmWX+B82xptsDC/JLwx6ev2moQnT4i60=; b=AkAGu/E3g7GLOb43zJyTN2EYiIZ2Us4CAnDLGLAd+oAzVrXD472RIFiU5JkhKclXE0/tzA 6WMG0UjPlmvXrjTLimHpM2OWl0Ya5Bjwh2w36FaG+nj6kIAEx0LbN1bD6wYbhzPGVcRdJn 1s9i6F1FEVxX+0TPWBFdOKQqRbRxq8U= X-MC-Unique: Vm5PQxP2OXSV_PcIbDz9zQ-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 1/5] virCPUDefParseXML: Parse uint using virXPathUInt() Date: Tue, 21 Sep 2021 16:50:27 +0200 Message-Id: <19a0c198d90e8a5c13fb5493a081d0b9230e7317.1632235712.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: imammedo@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1632235853286100002 Content-Type: text/plain; charset="utf-8" There is no need to use virXPathULong() and a temporary UL variable if we can use virXPathUInt() directly. Signed-off-by: Michal Privoznik Reviewed-by: Peter Krempa --- src/conf/cpu_conf.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c index 1674cd6957..d31f28dfe7 100644 --- a/src/conf/cpu_conf.c +++ b/src/conf/cpu_conf.c @@ -526,39 +526,33 @@ virCPUDefParseXML(xmlXPathContextPtr ctxt, } =20 if (virXPathNode("./topology[1]", ctxt)) { - unsigned long ul; - - if (virXPathULong("string(./topology[1]/@sockets)", ctxt, &ul) < 0= ) { + if (virXPathUInt("string(./topology[1]/@sockets)", ctxt, &def->soc= kets) < 0) { virReportError(VIR_ERR_XML_ERROR, "%s", _("Missing 'sockets' attribute in CPU topology"= )); return -1; } - def->sockets =3D (unsigned int) ul; =20 if (virXPathNode("./topology[1]/@dies", ctxt)) { - if (virXPathULong("string(./topology[1]/@dies)", ctxt, &ul) < = 0) { + if (virXPathUInt("string(./topology[1]/@dies)", ctxt, &def->di= es) < 0) { virReportError(VIR_ERR_XML_ERROR, "%s", _("Malformed 'dies' attribute in CPU topolo= gy")); return -1; } - def->dies =3D (unsigned int) ul; } else { def->dies =3D 1; } =20 - if (virXPathULong("string(./topology[1]/@cores)", ctxt, &ul) < 0) { + if (virXPathUInt("string(./topology[1]/@cores)", ctxt, &def->cores= ) < 0) { virReportError(VIR_ERR_XML_ERROR, "%s", _("Missing 'cores' attribute in CPU topology")); return -1; } - def->cores =3D (unsigned int) ul; =20 - if (virXPathULong("string(./topology[1]/@threads)", ctxt, &ul) < 0= ) { + if (virXPathUInt("string(./topology[1]/@threads)", ctxt, &def->thr= eads) < 0) { virReportError(VIR_ERR_XML_ERROR, "%s", _("Missing 'threads' attribute in CPU topology"= )); return -1; } - def->threads =3D (unsigned int) ul; =20 if (!def->sockets || !def->cores || !def->threads || !def->dies) { virReportError(VIR_ERR_XML_ERROR, "%s", --=20 2.32.0 From nobody Sun May 12 13:45:49 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1632235851; cv=none; d=zohomail.com; s=zohoarc; b=CacmTnrRe/kCfFk836e9YknljSiFRf7UiIntzH/wauicEf9kQ7wo97QrIkt+o6iNovZqdgXMQFe9lgEZkJXoszI3ehyRiBo57VZQqUkyCr8BDwvWarQhIC2gTJc4yaX4FG1Odiznl3dAPCjW/SZRimyK3zaHM4Pw4OhdRB/Nn3M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1632235851; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=YuzgVORFYLjXEMVXTCodAfDhHCAritNDp4rDgrkhEII=; b=QuvB3N+KPvErh8M/9Sn+/BLW/s1ULi2pgVy4g1pcTzEt2sxHl+EFqAR+eFOeUCbBolCiCO9GJFHk/Ksk0vHgQXzHY3ugHdmCAs9eRmSIJr5+yNbkPpAa2tA2ZAHA7mNb35JH0ZKpf8NHJaLfpmBZHXtRRh6tvjJ7jJW44S3OtOI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1632235851556721.6139510833356; Tue, 21 Sep 2021 07:50:51 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-330-A7R99_m1PYy4fEYgLP1Iuw-1; Tue, 21 Sep 2021 10:50:48 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CD45B84A5E6; Tue, 21 Sep 2021 14:50:43 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AD98C5DF26; Tue, 21 Sep 2021 14:50:43 +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 A65794E58F; Tue, 21 Sep 2021 14:50:42 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 18LEoeV4009989 for ; Tue, 21 Sep 2021 10:50:40 -0400 Received: by smtp.corp.redhat.com (Postfix) id 624EA6B543; Tue, 21 Sep 2021 14:50:40 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.93]) by smtp.corp.redhat.com (Postfix) with ESMTP id BB77A1865D; Tue, 21 Sep 2021 14:50:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1632235850; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=YuzgVORFYLjXEMVXTCodAfDhHCAritNDp4rDgrkhEII=; b=bLoe4upLkKJPEGo7idYkWfwJCfgW+10cZZymBiwcyzBQzPCTqEe3L8Lor1JcoamXVMmmnm xY1TbTsbsnsjOMhW590If5puDHoDFE4+hM8IxmRybJnV3tTaLD5LQ3i9SiiPeupQu0RYpV r88AoA59yMHfXcZ+zLx+IfcQCezIhs0= X-MC-Unique: A7R99_m1PYy4fEYgLP1Iuw-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 2/5] virCPUDefParseXML: Prefer virXMLPropUInt over virXPathUInt Date: Tue, 21 Sep 2021 16:50:28 +0200 Message-Id: <6340e153d1cf8f764f12c9010e70efd39c19118e.1632235712.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: imammedo@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1632235853273100001 Content-Type: text/plain; charset="utf-8" When parsing CPU topology, which is described in attributes we can use virXMLPropUInt() instead of virXPathUInt() as the former results in shorter code. Signed-off-by: Michal Privoznik Reviewed-by: Peter Krempa --- src/conf/cpu_conf.c | 41 ++++++++++++++++++----------------------- 1 file changed, 18 insertions(+), 23 deletions(-) diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c index d31f28dfe7..fbceac1657 100644 --- a/src/conf/cpu_conf.c +++ b/src/conf/cpu_conf.c @@ -320,6 +320,7 @@ virCPUDefParseXML(xmlXPathContextPtr ctxt, { g_autoptr(virCPUDef) def =3D NULL; g_autofree xmlNodePtr *nodes =3D NULL; + xmlNodePtr topology =3D NULL; VIR_XPATH_NODE_AUTORESTORE(ctxt) int n; size_t i; @@ -525,38 +526,32 @@ virCPUDefParseXML(xmlXPathContextPtr ctxt, return -1; } =20 - if (virXPathNode("./topology[1]", ctxt)) { - if (virXPathUInt("string(./topology[1]/@sockets)", ctxt, &def->soc= kets) < 0) { - virReportError(VIR_ERR_XML_ERROR, "%s", - _("Missing 'sockets' attribute in CPU topology"= )); + if ((topology =3D virXPathNode("./topology[1]", ctxt))) { + int rc; + + if (virXMLPropUInt(topology, "sockets", 10, + VIR_XML_PROP_REQUIRED | VIR_XML_PROP_NONZERO, + &def->sockets) < 0) { return -1; } =20 - if (virXPathNode("./topology[1]/@dies", ctxt)) { - if (virXPathUInt("string(./topology[1]/@dies)", ctxt, &def->di= es) < 0) { - virReportError(VIR_ERR_XML_ERROR, "%s", - _("Malformed 'dies' attribute in CPU topolo= gy")); - return -1; - } - } else { + if ((rc =3D virXMLPropUInt(topology, "dies", 10, + VIR_XML_PROP_NONZERO, + &def->dies)) < 0) { + return -1; + } else if (rc =3D=3D 0) { def->dies =3D 1; } =20 - if (virXPathUInt("string(./topology[1]/@cores)", ctxt, &def->cores= ) < 0) { - virReportError(VIR_ERR_XML_ERROR, "%s", - _("Missing 'cores' attribute in CPU topology")); + if (virXMLPropUInt(topology, "cores", 10, + VIR_XML_PROP_REQUIRED | VIR_XML_PROP_NONZERO, + &def->cores) < 0) { return -1; } =20 - if (virXPathUInt("string(./topology[1]/@threads)", ctxt, &def->thr= eads) < 0) { - virReportError(VIR_ERR_XML_ERROR, "%s", - _("Missing 'threads' attribute in CPU topology"= )); - return -1; - } - - if (!def->sockets || !def->cores || !def->threads || !def->dies) { - virReportError(VIR_ERR_XML_ERROR, "%s", - _("Invalid CPU topology")); + if (virXMLPropUInt(topology, "threads", 10, + VIR_XML_PROP_REQUIRED | VIR_XML_PROP_NONZERO, + &def->threads) < 0) { return -1; } } --=20 2.32.0 From nobody Sun May 12 13:45:49 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1632235863; cv=none; d=zohomail.com; s=zohoarc; b=dgQ5y/MRJjQrVXgs0Ig6jN2WqDyLP4zyRuHdIAbm81zZcFY23SIde2pz3yV6X17LsYQYgQSSwoAYDTJkYTIlTel7sPHhtCfwqpqQceggmCTZz8h4N/dzqVE47mayAV7wdjJa6d9jto7rWfrRZ18AiHj5hIqhV2tvAwa1bUCD/cI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1632235863; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=45DB2W9TggCHKH3Xv4x4OpN31Ho6/110OnUAlOvOoxA=; b=KcEPE12mZWwz17oegqXjsmwKqfilvV6So6ZhPcYP9xiRVC/no7/DJhNh5vOA4lWhjn+d3OfY1Bbtm8eP1rPe8YDRVCHE0d1dCTtiDzn82FWx6LaT0A8fseqRb+Y+DXCfFf5P4E3ZwmwIejNRcjTLoaGroaO4DDb7m5FQVzkD/KA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1632235863552900.0022099519128; Tue, 21 Sep 2021 07:51:03 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-194-n5Axj0fgMfWp5OX_a3sQsQ-1; Tue, 21 Sep 2021 10:51:00 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CA36619057A6; Tue, 21 Sep 2021 14:50:52 +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 A97CB5BAEB; Tue, 21 Sep 2021 14:50:52 +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 67E5A180BAD1; Tue, 21 Sep 2021 14:50:52 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 18LEof4u009998 for ; Tue, 21 Sep 2021 10:50:41 -0400 Received: by smtp.corp.redhat.com (Postfix) id 5617E6ACE0; Tue, 21 Sep 2021 14:50:41 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.93]) by smtp.corp.redhat.com (Postfix) with ESMTP id AEC441865D; Tue, 21 Sep 2021 14:50:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1632235862; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=45DB2W9TggCHKH3Xv4x4OpN31Ho6/110OnUAlOvOoxA=; b=faSx+56gfic0AU/ESHsE7iUAL/F7WUah7fq2Ms/tSa/xqI1xUYs9wuiFQoyO4yK/RvC2ho XumP2OYAp+gx7BHuGcGKayDOSNbntEJ/irifcVUNvMh9/fTNYp76U1Jvxh5zgh7v5Rg+Pq sje2So3fSAkPri8tGMufewwO62trKLU= X-MC-Unique: n5Axj0fgMfWp5OX_a3sQsQ-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 3/5] qemuBuildNumaCommandLine: Move vars into loops Date: Tue, 21 Sep 2021 16:50:29 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: imammedo@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1632235865199100001 Content-Type: text/plain; charset="utf-8" There are two variables that are used only in a single loop. Move their definitions into their respective blocks. Signed-off-by: Michal Privoznik Reviewed-by: Peter Krempa --- src/qemu/qemu_command.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 3de37aa5c5..020cbfa214 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -7416,11 +7416,9 @@ qemuBuildNumaCommandLine(virQEMUDriverConfig *cfg, size_t i, j; virQEMUCaps *qemuCaps =3D priv->qemuCaps; g_auto(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; - char *next =3D NULL; virBuffer *nodeBackends =3D NULL; bool needBackend =3D false; bool hmat =3D false; - int rc; int ret =3D -1; size_t ncells =3D virDomainNumaGetNodeCount(def->numa); ssize_t masterInitiator =3D -1; @@ -7445,6 +7443,7 @@ qemuBuildNumaCommandLine(virQEMUDriverConfig *cfg, if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_OBJECT_MEMORY_RAM) || virQEMUCapsGet(qemuCaps, QEMU_CAPS_OBJECT_MEMORY_FILE) || virQEMUCapsGet(qemuCaps, QEMU_CAPS_OBJECT_MEMORY_MEMFD)) { + int rc; =20 for (i =3D 0; i < ncells; i++) { if ((rc =3D qemuBuildMemoryCellBackendStr(def, cfg, i, priv, @@ -7487,6 +7486,7 @@ qemuBuildNumaCommandLine(virQEMUDriverConfig *cfg, =20 if (cpumask) { g_autofree char *cpumaskStr =3D NULL; + char *next =3D NULL; char *tmpmask; =20 if (!(cpumaskStr =3D virBitmapFormat(cpumask))) --=20 2.32.0 From nobody Sun May 12 13:45:49 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1632235927; cv=none; d=zohomail.com; s=zohoarc; b=huP8H31DY38pxmxoOliljJtXuVVmXAE7DTvHY9hCQWbukQL9GwSb7d1f0Igj7ggCSYGY7UDFoPFGHIHegw8LOGRBghPzBWdiowoobuFkudgzFl6hOuoeLU7dFvxZt3aWHPnTV7fnaY3J6LFOpSFyiAKtfa9yBitKk7+BmaNyxJ8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1632235927; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=DHqov5G3LkKhbj9KfSuplvagR82bhVz+lRX5fezLBTo=; b=TuEDzTQaXIIXZZnq51e9SWyxHen9Ylu/bUZxmjF6LJbTaIhtbHjKm9x6s3irs14obWQqGrFXWuI20a/13cUFNYJUna6v6vzmRtSJdXNlrM6Qps9UaElMuharSyJRW65c7Yl7oLhqnGURZF3kWkDggDczYUAvqrNIoE22FQkBJq0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1632235927138398.522240158916; Tue, 21 Sep 2021 07:52:07 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-36-uwXqh1bXORGNvXcP3k3eSg-1; Tue, 21 Sep 2021 10:51:05 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BD37384A5E4; Tue, 21 Sep 2021 14:50:52 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9BE074EF71; Tue, 21 Sep 2021 14:50:52 +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 602884EA29; Tue, 21 Sep 2021 14:50:52 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 18LEoge8010005 for ; Tue, 21 Sep 2021 10:50:42 -0400 Received: by smtp.corp.redhat.com (Postfix) id 49F456ACE0; Tue, 21 Sep 2021 14:50:42 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.93]) by smtp.corp.redhat.com (Postfix) with ESMTP id A1EB86B544; Tue, 21 Sep 2021 14:50:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1632235926; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=DHqov5G3LkKhbj9KfSuplvagR82bhVz+lRX5fezLBTo=; b=Xexp48ZxlUHMScbYrAZ6V7O7uD2f2P8TaJTFsy9YmbtTA2ArqPy6rh/+9K0fY0d5qnKx6K CK/2YDuVOwbaM5TvKAG+frqQXaxjYG6Bivi9lBfw72vqOM6/y+pMK9794bagX4WSG0yoMC 2/CNbXuFI8o9pczYJyJqlkqPZpHEIEk= X-MC-Unique: uwXqh1bXORGNvXcP3k3eSg-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 4/5] qemuBuildNumaCommandLine: Separate out building of CPU list Date: Tue, 21 Sep 2021 16:50:30 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: imammedo@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1632235928264100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Michal Privoznik --- src/qemu/qemu_command.c | 43 ++++++++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 020cbfa214..f04ae1e311 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -7407,6 +7407,31 @@ qemuBuildNumaHMATCommandLine(virCommand *cmd, } =20 =20 +static int +qemuBuildNumaCPUs(virBuffer *buf, + virBitmap *cpu) +{ + g_autofree char *cpumask =3D NULL; + char *tmpmask =3D NULL; + char *next =3D NULL; + + if (!cpu) + return 0; + + if (!(cpumask =3D virBitmapFormat(cpu))) + return -1; + + for (tmpmask =3D cpumask; tmpmask; tmpmask =3D next) { + if ((next =3D strchr(tmpmask, ','))) + *(next++) =3D '\0'; + virBufferAddLit(buf, ",cpus=3D"); + virBufferAdd(buf, tmpmask, -1); + } + + return 0; +} + + static int qemuBuildNumaCommandLine(virQEMUDriverConfig *cfg, virDomainDef *def, @@ -7473,7 +7498,6 @@ qemuBuildNumaCommandLine(virQEMUDriverConfig *cfg, } =20 for (i =3D 0; i < ncells; i++) { - virBitmap *cpumask =3D virDomainNumaGetNodeCpumask(def->numa, i); ssize_t initiator =3D virDomainNumaGetNodeInitiator(def->numa, i); =20 if (needBackend) { @@ -7484,21 +7508,8 @@ qemuBuildNumaCommandLine(virQEMUDriverConfig *cfg, virCommandAddArg(cmd, "-numa"); virBufferAsprintf(&buf, "node,nodeid=3D%zu", i); =20 - if (cpumask) { - g_autofree char *cpumaskStr =3D NULL; - char *next =3D NULL; - char *tmpmask; - - if (!(cpumaskStr =3D virBitmapFormat(cpumask))) - goto cleanup; - - for (tmpmask =3D cpumaskStr; tmpmask; tmpmask =3D next) { - if ((next =3D strchr(tmpmask, ','))) - *(next++) =3D '\0'; - virBufferAddLit(&buf, ",cpus=3D"); - virBufferAdd(&buf, tmpmask, -1); - } - } + if (qemuBuildNumaCPUs(&buf, virDomainNumaGetNodeCpumask(def->numa,= i)) < 0) + goto cleanup; =20 if (hmat) { if (initiator < 0) --=20 2.32.0 From nobody Sun May 12 13:45:49 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1632235867; cv=none; d=zohomail.com; s=zohoarc; b=UM3pjVcqDrjKkRoCWi+7krRCZe7XTWygf1zEqtygWo9dMDbn6Oec3BPr+dtuKlbj/jEELUpsUlVX3T9U4i64ley2xf478eS8du1iHtoFUfRQDpnj8cOrfeMzrl7PSiAH7jCgxL4TZHJWmg4tqckGrSiBwOnLMRNkuK+Ep2810/I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1632235867; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=VCgufKhOjC558MjTBiLbvCCsXHy1pT9aSuyPODqWsic=; b=GPYES/2UVFvaXhlvUaU24nuYawcGqBSPiysAk0XUoZv4kX0KcXD7w44EVZNMi6xao299f9z9yc3NUfF9eIBc+8giObEPmcyQOPc5i2MdO3UoSsS3JgdQ01/lZir2E0SaUINHbY7USrkTJ2VHk9047va7DrPnXNhctzFDQIW2kRg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1632235867661998.420131759413; Tue, 21 Sep 2021 07:51:07 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-334-rCOIhvP2MS6LmcyNuF1X7g-1; Tue, 21 Sep 2021 10:51:02 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 070A9100CCC4; Tue, 21 Sep 2021 14:50:56 +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 DA5DD1009962; Tue, 21 Sep 2021 14:50:55 +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 A7B3A1806D03; Tue, 21 Sep 2021 14:50:55 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 18LEohWe010020 for ; Tue, 21 Sep 2021 10:50:43 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8904D6B545; Tue, 21 Sep 2021 14:50:43 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.93]) by smtp.corp.redhat.com (Postfix) with ESMTP id 960FF1865D; Tue, 21 Sep 2021 14:50:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1632235866; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=VCgufKhOjC558MjTBiLbvCCsXHy1pT9aSuyPODqWsic=; b=S6Oo3qK3FXGSnq7s7+zD24Arm1mQrhgD+0GXD/47NBcgH8343BognBZQ4A26r8D3W95SK5 vLM0zruKrs3ugYWVa7uy6OJIE+jhDbKGbkw6LZFRVbJZXSU8YSJb2hyZZnnByD6dJ1xDYI uKBGG36ESCFrHFACqRsdcruyUApMxOw= X-MC-Unique: rCOIhvP2MS6LmcyNuF1X7g-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 5/5] qemu: Prefer -numa cpu over -numa node,cpus= Date: Tue, 21 Sep 2021 16:50:31 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: imammedo@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1632235869978100001 Content-Type: text/plain; charset="utf-8" QEMU is trying to obsolete -numa node,cpus=3D because that uses ambiguous vCPU id to [socket, die, core, thread] mapping. The new form is: -numa cpu,node-id=3DN,socket-id=3DS,die-id=3DD,core-id=3DC,thread-id=3DT which is repeated for every vCPU and places it at [S, D, C, T] into guest NUMA node N. While in general this is magic mapping, we can deal with it. Firstly, with QEMU 2.7 or newer, libvirt ensures that if topology is given then maxvcpus must be sockets * dies * cores * threads (i.e. there are no 'holes'). Secondly, if no topology is given then libvirt itself places each vCPU into a different socket (basically, it fakes topology of: [maxvcpus, 1, 1, 1]) Thirdly, we can copy whatever QEMU is doing when mapping vCPUs onto topology, to make sure vCPUs don't start to move around. Note, migration from old to new cmd line works and therefore doesn't need any special handling. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=3D1678085 Signed-off-by: Michal Privoznik --- src/qemu/qemu_command.c | 112 +++++++++++++++++- .../hugepages-nvdimm.x86_64-latest.args | 4 +- ...memory-default-hugepage.x86_64-latest.args | 10 +- .../memfd-memory-numa.x86_64-latest.args | 10 +- ...y-hotplug-nvdimm-access.x86_64-latest.args | 4 +- ...ory-hotplug-nvdimm-align.x86_64-5.2.0.args | 4 +- ...ry-hotplug-nvdimm-align.x86_64-latest.args | 4 +- ...ory-hotplug-nvdimm-label.x86_64-5.2.0.args | 4 +- ...ry-hotplug-nvdimm-label.x86_64-latest.args | 4 +- ...mory-hotplug-nvdimm-pmem.x86_64-5.2.0.args | 4 +- ...ory-hotplug-nvdimm-pmem.x86_64-latest.args | 4 +- ...-hotplug-nvdimm-readonly.x86_64-5.2.0.args | 4 +- ...hotplug-nvdimm-readonly.x86_64-latest.args | 4 +- .../memory-hotplug-nvdimm.x86_64-latest.args | 4 +- ...mory-hotplug-virtio-pmem.x86_64-5.2.0.args | 4 +- ...ory-hotplug-virtio-pmem.x86_64-latest.args | 4 +- .../numatune-hmat.x86_64-latest.args | 18 ++- ...emnode-restrictive-mode.x86_64-latest.args | 38 +++++- .../numatune-memnode.x86_64-5.2.0.args | 38 +++++- .../numatune-memnode.x86_64-latest.args | 38 +++++- ...vhost-user-fs-fd-memory.x86_64-latest.args | 4 +- ...vhost-user-fs-hugepages.x86_64-latest.args | 4 +- ...host-user-gpu-secondary.x86_64-latest.args | 3 +- .../vhost-user-vga.x86_64-latest.args | 3 +- 24 files changed, 296 insertions(+), 34 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index f04ae1e311..5192bd7630 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -7408,8 +7408,8 @@ qemuBuildNumaHMATCommandLine(virCommand *cmd, =20 =20 static int -qemuBuildNumaCPUs(virBuffer *buf, - virBitmap *cpu) +qemuBuildNumaOldCPUs(virBuffer *buf, + virBitmap *cpu) { g_autofree char *cpumask =3D NULL; char *tmpmask =3D NULL; @@ -7432,6 +7432,94 @@ qemuBuildNumaCPUs(virBuffer *buf, } =20 =20 +/** + * qemuTranlsatevCPUID: + * + * For given vCPU @id and vCPU topology (@cpu) compute corresponding + * @socket, @die, @core and @thread). This assumes linear topology, + * that is every [socket, die, core, thread] combination is valid vCPU + * ID and there are no 'holes'. This is ensured by + * qemuValidateDomainDef() if QEMU_CAPS_QUERY_HOTPLUGGABLE_CPUS is + * set. + * + * Moreover, if @diesSupported is false (QEMU lacks + * QEMU_CAPS_SMP_DIES) then @die is set to zero and @socket is + * computed without taking number of dies into account. + * + * The algorithm is shamelessly copied over from QEMU's + * x86_topo_ids_from_idx() and its history (before introducing dies). + */ +static void +qemuTranlsatevCPUID(unsigned int id, + bool diesSupported, + virCPUDef *cpu, + unsigned int *socket, + unsigned int *die, + unsigned int *core, + unsigned int *thread) +{ + if (cpu && cpu->sockets) { + *thread =3D id % cpu->threads; + *core =3D id / cpu->threads % cpu->cores; + if (diesSupported) { + *die =3D id / (cpu->cores * cpu->threads) % cpu->dies; + *socket =3D id / (cpu->dies * cpu->cores * cpu->threads); + } else { + *die =3D 0; + *socket =3D id / (cpu->cores * cpu->threads) % cpu->sockets; + } + } else { + /* If no topology was provided, then qemuBuildSmpCommandLine() + * puts all vCPUs into a separate socket. */ + *thread =3D 0; + *core =3D 0; + *die =3D 0; + *socket =3D id; + } +} + + +static void +qemuBuildNumaNewCPUs(virCommand *cmd, + virCPUDef *cpu, + virBitmap *cpumask, + size_t nodeid, + virQEMUCaps *qemuCaps) +{ + const bool diesSupported =3D virQEMUCapsGet(qemuCaps, QEMU_CAPS_SMP_DI= ES); + ssize_t vcpuid =3D -1; + + if (!cpumask) + return; + + while ((vcpuid =3D virBitmapNextSetBit(cpumask, vcpuid)) >=3D 0) { + unsigned int socket; + unsigned int die; + unsigned int core; + unsigned int thread; + + qemuTranlsatevCPUID(vcpuid, diesSupported, cpu, + &socket, &die, &core, &thread); + + virCommandAddArg(cmd, "-numa"); + + /* The simple fact that dies are supported by QEMU doesn't mean we= can + * put it onto command line. QEMU will accept die-id only if -smp = dies + * was set to a value greater than 1. On the other hand, this allo= ws us + * to generate shorter command line. */ + if (diesSupported && cpu && cpu->dies > 1) { + virCommandAddArgFormat(cmd, + "cpu,node-id=3D%zu,socket-id=3D%u,die-i= d=3D%u,core-id=3D%u,thread-id=3D%u", + nodeid, socket, die, core, thread); + } else { + virCommandAddArgFormat(cmd, + "cpu,node-id=3D%zu,socket-id=3D%u,core-= id=3D%u,thread-id=3D%u", + nodeid, socket, core, thread); + } + } +} + + static int qemuBuildNumaCommandLine(virQEMUDriverConfig *cfg, virDomainDef *def, @@ -7444,6 +7532,7 @@ qemuBuildNumaCommandLine(virQEMUDriverConfig *cfg, virBuffer *nodeBackends =3D NULL; bool needBackend =3D false; bool hmat =3D false; + bool newCpus =3D false; int ret =3D -1; size_t ncells =3D virDomainNumaGetNodeCount(def->numa); ssize_t masterInitiator =3D -1; @@ -7484,6 +7573,17 @@ qemuBuildNumaCommandLine(virQEMUDriverConfig *cfg, qemuBuildMemPathStr(def, cmd, priv) < 0) goto cleanup; =20 + /* Use modern style of specifying vCPU topology only if: + * -numa cpu is available, introduced in the same time as -numa + * dist, hence slightly misleading capability test, and + * query-hotpluggable-cpus is avialable, because then + * qemuValidateDomainDef() ensures that if + * topology is specified it matches max vCPU + * count and we can make some shortcuts in + * qemuTranlsatevCPUID(). + */ + newCpus =3D virQEMUCapsGet(qemuCaps, QEMU_CAPS_QUERY_HOTPLUGGABLE_CPUS= ); + for (i =3D 0; i < ncells; i++) { if (virDomainNumaGetNodeCpumask(def->numa, i)) { masterInitiator =3D i; @@ -7498,6 +7598,7 @@ qemuBuildNumaCommandLine(virQEMUDriverConfig *cfg, } =20 for (i =3D 0; i < ncells; i++) { + virBitmap *cpu =3D virDomainNumaGetNodeCpumask(def->numa, i); ssize_t initiator =3D virDomainNumaGetNodeInitiator(def->numa, i); =20 if (needBackend) { @@ -7508,7 +7609,9 @@ qemuBuildNumaCommandLine(virQEMUDriverConfig *cfg, virCommandAddArg(cmd, "-numa"); virBufferAsprintf(&buf, "node,nodeid=3D%zu", i); =20 - if (qemuBuildNumaCPUs(&buf, virDomainNumaGetNodeCpumask(def->numa,= i)) < 0) + /* -numa cpu is supported from the same release as -numa dist */ + if (!newCpus && + qemuBuildNumaOldCPUs(&buf, cpu) < 0) goto cleanup; =20 if (hmat) { @@ -7525,6 +7628,9 @@ qemuBuildNumaCommandLine(virQEMUDriverConfig *cfg, virDomainNumaGetNodeMemorySize(def->numa, i)= / 1024); =20 virCommandAddArgBuffer(cmd, &buf); + + if (newCpus) + qemuBuildNumaNewCPUs(cmd, def->cpu, cpu, i, qemuCaps); } =20 /* If NUMA node distance is specified for at least one pair diff --git a/tests/qemuxml2argvdata/hugepages-nvdimm.x86_64-latest.args b/t= ests/qemuxml2argvdata/hugepages-nvdimm.x86_64-latest.args index 9f3c6fa63f..8af4b44758 100644 --- a/tests/qemuxml2argvdata/hugepages-nvdimm.x86_64-latest.args +++ b/tests/qemuxml2argvdata/hugepages-nvdimm.x86_64-latest.args @@ -16,7 +16,9 @@ XDG_CONFIG_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.config \ -overcommit mem-lock=3Doff \ -smp 2,sockets=3D2,dies=3D1,cores=3D1,threads=3D1 \ -object '{"qom-type":"memory-backend-file","id":"ram-node0","mem-path":"/d= ev/hugepages2M/libvirt/qemu/-1-QEMUGuest1","share":true,"prealloc":true,"si= ze":1073741824}' \ --numa node,nodeid=3D0,cpus=3D0-1,memdev=3Dram-node0 \ +-numa node,nodeid=3D0,memdev=3Dram-node0 \ +-numa cpu,node-id=3D0,socket-id=3D0,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D0,socket-id=3D1,core-id=3D0,thread-id=3D0 \ -object '{"qom-type":"memory-backend-file","id":"memnvdimm0","mem-path":"/= tmp/nvdimm","share":true,"prealloc":true,"size":536870912}' \ -device nvdimm,node=3D0,memdev=3Dmemnvdimm0,id=3Dnvdimm0,slot=3D0 \ -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ diff --git a/tests/qemuxml2argvdata/memfd-memory-default-hugepage.x86_64-la= test.args b/tests/qemuxml2argvdata/memfd-memory-default-hugepage.x86_64-lat= est.args index 5e54908666..e0114d3423 100644 --- a/tests/qemuxml2argvdata/memfd-memory-default-hugepage.x86_64-latest.ar= gs +++ b/tests/qemuxml2argvdata/memfd-memory-default-hugepage.x86_64-latest.ar= gs @@ -16,7 +16,15 @@ XDG_CONFIG_HOME=3D/tmp/lib/domain--1-instance-00000092/.= config \ -overcommit mem-lock=3Doff \ -smp 8,sockets=3D1,dies=3D1,cores=3D8,threads=3D1 \ -object '{"qom-type":"memory-backend-memfd","id":"ram-node0","hugetlb":tru= e,"hugetlbsize":2097152,"share":true,"prealloc":true,"size":15032385536,"ho= st-nodes":[3],"policy":"preferred"}' \ --numa node,nodeid=3D0,cpus=3D0-7,memdev=3Dram-node0 \ +-numa node,nodeid=3D0,memdev=3Dram-node0 \ +-numa cpu,node-id=3D0,socket-id=3D0,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D0,socket-id=3D0,core-id=3D1,thread-id=3D0 \ +-numa cpu,node-id=3D0,socket-id=3D0,core-id=3D2,thread-id=3D0 \ +-numa cpu,node-id=3D0,socket-id=3D0,core-id=3D3,thread-id=3D0 \ +-numa cpu,node-id=3D0,socket-id=3D0,core-id=3D4,thread-id=3D0 \ +-numa cpu,node-id=3D0,socket-id=3D0,core-id=3D5,thread-id=3D0 \ +-numa cpu,node-id=3D0,socket-id=3D0,core-id=3D6,thread-id=3D0 \ +-numa cpu,node-id=3D0,socket-id=3D0,core-id=3D7,thread-id=3D0 \ -uuid 126f2720-6f8e-45ab-a886-ec9277079a67 \ -display none \ -no-user-config \ diff --git a/tests/qemuxml2argvdata/memfd-memory-numa.x86_64-latest.args b/= tests/qemuxml2argvdata/memfd-memory-numa.x86_64-latest.args index 3b33db3c55..dd517ebf8a 100644 --- a/tests/qemuxml2argvdata/memfd-memory-numa.x86_64-latest.args +++ b/tests/qemuxml2argvdata/memfd-memory-numa.x86_64-latest.args @@ -16,7 +16,15 @@ XDG_CONFIG_HOME=3D/tmp/lib/domain--1-instance-00000092/.= config \ -overcommit mem-lock=3Doff \ -smp 8,sockets=3D1,dies=3D1,cores=3D8,threads=3D1 \ -object '{"qom-type":"memory-backend-memfd","id":"ram-node0","hugetlb":tru= e,"hugetlbsize":2097152,"share":true,"prealloc":true,"size":15032385536,"ho= st-nodes":[3],"policy":"preferred"}' \ --numa node,nodeid=3D0,cpus=3D0-7,memdev=3Dram-node0 \ +-numa node,nodeid=3D0,memdev=3Dram-node0 \ +-numa cpu,node-id=3D0,socket-id=3D0,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D0,socket-id=3D0,core-id=3D1,thread-id=3D0 \ +-numa cpu,node-id=3D0,socket-id=3D0,core-id=3D2,thread-id=3D0 \ +-numa cpu,node-id=3D0,socket-id=3D0,core-id=3D3,thread-id=3D0 \ +-numa cpu,node-id=3D0,socket-id=3D0,core-id=3D4,thread-id=3D0 \ +-numa cpu,node-id=3D0,socket-id=3D0,core-id=3D5,thread-id=3D0 \ +-numa cpu,node-id=3D0,socket-id=3D0,core-id=3D6,thread-id=3D0 \ +-numa cpu,node-id=3D0,socket-id=3D0,core-id=3D7,thread-id=3D0 \ -object '{"qom-type":"memory-backend-file","id":"memnvdimm0","mem-path":"/= tmp/nvdimm","share":true,"prealloc":true,"size":536870912,"host-nodes":[3],= "policy":"preferred"}' \ -device nvdimm,node=3D0,memdev=3Dmemnvdimm0,id=3Dnvdimm0,slot=3D0 \ -uuid 126f2720-6f8e-45ab-a886-ec9277079a67 \ diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-access.x86_64-lat= est.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-access.x86_64-lates= t.args index d124ba7f29..8ff665e658 100644 --- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-access.x86_64-latest.args +++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-access.x86_64-latest.args @@ -16,7 +16,9 @@ XDG_CONFIG_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.config \ -overcommit mem-lock=3Doff \ -smp 2,sockets=3D2,dies=3D1,cores=3D1,threads=3D1 \ -object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":22439526= 4}' \ --numa node,nodeid=3D0,cpus=3D0-1,memdev=3Dram-node0 \ +-numa node,nodeid=3D0,memdev=3Dram-node0 \ +-numa cpu,node-id=3D0,socket-id=3D0,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D0,socket-id=3D1,core-id=3D0,thread-id=3D0 \ -object '{"qom-type":"memory-backend-file","id":"memnvdimm0","mem-path":"/= tmp/nvdimm","share":false,"prealloc":true,"size":536870912}' \ -device nvdimm,node=3D0,memdev=3Dmemnvdimm0,id=3Dnvdimm0,slot=3D0 \ -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.x86_64-5.2.= 0.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.x86_64-5.2.0.ar= gs index 0c1b9a6de6..a37467c68c 100644 --- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.x86_64-5.2.0.args +++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.x86_64-5.2.0.args @@ -16,7 +16,9 @@ XDG_CONFIG_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.config \ -overcommit mem-lock=3Doff \ -smp 2,sockets=3D2,dies=3D1,cores=3D1,threads=3D1 \ -object memory-backend-ram,id=3Dram-node0,size=3D224395264 \ --numa node,nodeid=3D0,cpus=3D0-1,memdev=3Dram-node0 \ +-numa node,nodeid=3D0,memdev=3Dram-node0 \ +-numa cpu,node-id=3D0,socket-id=3D0,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D0,socket-id=3D1,core-id=3D0,thread-id=3D0 \ -object memory-backend-file,id=3Dmemnvdimm0,mem-path=3D/tmp/nvdimm,share= =3Doff,prealloc=3Don,size=3D536870912,align=3D2097152 \ -device nvdimm,node=3D0,memdev=3Dmemnvdimm0,id=3Dnvdimm0,slot=3D0 \ -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.x86_64-late= st.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.x86_64-latest.= args index c3f5c8d558..52fabbb89e 100644 --- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.x86_64-latest.args +++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.x86_64-latest.args @@ -16,7 +16,9 @@ XDG_CONFIG_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.config \ -overcommit mem-lock=3Doff \ -smp 2,sockets=3D2,dies=3D1,cores=3D1,threads=3D1 \ -object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":22439526= 4}' \ --numa node,nodeid=3D0,cpus=3D0-1,memdev=3Dram-node0 \ +-numa node,nodeid=3D0,memdev=3Dram-node0 \ +-numa cpu,node-id=3D0,socket-id=3D0,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D0,socket-id=3D1,core-id=3D0,thread-id=3D0 \ -object '{"qom-type":"memory-backend-file","id":"memnvdimm0","mem-path":"/= tmp/nvdimm","share":false,"prealloc":true,"size":536870912,"align":2097152}= ' \ -device nvdimm,node=3D0,memdev=3Dmemnvdimm0,id=3Dnvdimm0,slot=3D0 \ -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-label.x86_64-5.2.= 0.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-label.x86_64-5.2.0.ar= gs index d7c61b88a4..48eed90399 100644 --- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-label.x86_64-5.2.0.args +++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-label.x86_64-5.2.0.args @@ -16,7 +16,9 @@ XDG_CONFIG_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.config \ -overcommit mem-lock=3Doff \ -smp 2,sockets=3D2,dies=3D1,cores=3D1,threads=3D1 \ -object memory-backend-ram,id=3Dram-node0,size=3D224395264 \ --numa node,nodeid=3D0,cpus=3D0-1,memdev=3Dram-node0 \ +-numa node,nodeid=3D0,memdev=3Dram-node0 \ +-numa cpu,node-id=3D0,socket-id=3D0,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D0,socket-id=3D1,core-id=3D0,thread-id=3D0 \ -object memory-backend-file,id=3Dmemnvdimm0,mem-path=3D/tmp/nvdimm,share= =3Doff,prealloc=3Don,size=3D536870912 \ -device nvdimm,node=3D0,label-size=3D131072,memdev=3Dmemnvdimm0,id=3Dnvdim= m0,slot=3D0 \ -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-label.x86_64-late= st.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-label.x86_64-latest.= args index 51ff3dc455..09d6a91b57 100644 --- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-label.x86_64-latest.args +++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-label.x86_64-latest.args @@ -16,7 +16,9 @@ XDG_CONFIG_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.config \ -overcommit mem-lock=3Doff \ -smp 2,sockets=3D2,dies=3D1,cores=3D1,threads=3D1 \ -object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":22439526= 4}' \ --numa node,nodeid=3D0,cpus=3D0-1,memdev=3Dram-node0 \ +-numa node,nodeid=3D0,memdev=3Dram-node0 \ +-numa cpu,node-id=3D0,socket-id=3D0,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D0,socket-id=3D1,core-id=3D0,thread-id=3D0 \ -object '{"qom-type":"memory-backend-file","id":"memnvdimm0","mem-path":"/= tmp/nvdimm","share":false,"prealloc":true,"size":536870912}' \ -device nvdimm,node=3D0,label-size=3D131072,memdev=3Dmemnvdimm0,id=3Dnvdim= m0,slot=3D0 \ -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.x86_64-5.2.0= .args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.x86_64-5.2.0.args index 42fb1c9acb..a023974513 100644 --- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.x86_64-5.2.0.args +++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.x86_64-5.2.0.args @@ -16,7 +16,9 @@ XDG_CONFIG_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.config \ -overcommit mem-lock=3Doff \ -smp 2,sockets=3D2,dies=3D1,cores=3D1,threads=3D1 \ -object memory-backend-ram,id=3Dram-node0,size=3D224395264 \ --numa node,nodeid=3D0,cpus=3D0-1,memdev=3Dram-node0 \ +-numa node,nodeid=3D0,memdev=3Dram-node0 \ +-numa cpu,node-id=3D0,socket-id=3D0,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D0,socket-id=3D1,core-id=3D0,thread-id=3D0 \ -object memory-backend-file,id=3Dmemnvdimm0,mem-path=3D/tmp/nvdimm,share= =3Doff,size=3D536870912,pmem=3Don \ -device nvdimm,node=3D0,memdev=3Dmemnvdimm0,id=3Dnvdimm0,slot=3D0 \ -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.x86_64-lates= t.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.x86_64-latest.ar= gs index 19ecd08ae5..06d3bdcfe0 100644 --- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.x86_64-latest.args +++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.x86_64-latest.args @@ -16,7 +16,9 @@ XDG_CONFIG_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.config \ -overcommit mem-lock=3Doff \ -smp 2,sockets=3D2,dies=3D1,cores=3D1,threads=3D1 \ -object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":22439526= 4}' \ --numa node,nodeid=3D0,cpus=3D0-1,memdev=3Dram-node0 \ +-numa node,nodeid=3D0,memdev=3Dram-node0 \ +-numa cpu,node-id=3D0,socket-id=3D0,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D0,socket-id=3D1,core-id=3D0,thread-id=3D0 \ -object '{"qom-type":"memory-backend-file","id":"memnvdimm0","mem-path":"/= tmp/nvdimm","share":false,"size":536870912,"pmem":true}' \ -device nvdimm,node=3D0,memdev=3Dmemnvdimm0,id=3Dnvdimm0,slot=3D0 \ -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-readonly.x86_64-5= .2.0.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-readonly.x86_64-5.= 2.0.args index 15e1ee8b6c..b8480e1252 100644 --- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-readonly.x86_64-5.2.0.ar= gs +++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-readonly.x86_64-5.2.0.ar= gs @@ -16,7 +16,9 @@ XDG_CONFIG_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.config \ -overcommit mem-lock=3Doff \ -smp 2,sockets=3D2,dies=3D1,cores=3D1,threads=3D1 \ -object memory-backend-ram,id=3Dram-node0,size=3D224395264 \ --numa node,nodeid=3D0,cpus=3D0-1,memdev=3Dram-node0 \ +-numa node,nodeid=3D0,memdev=3Dram-node0 \ +-numa cpu,node-id=3D0,socket-id=3D0,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D0,socket-id=3D1,core-id=3D0,thread-id=3D0 \ -object memory-backend-file,id=3Dmemnvdimm0,mem-path=3D/tmp/nvdimm,share= =3Doff,prealloc=3Don,size=3D536870912 \ -device nvdimm,node=3D0,unarmed=3Don,memdev=3Dmemnvdimm0,id=3Dnvdimm0,slot= =3D0 \ -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-readonly.x86_64-l= atest.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-readonly.x86_64-l= atest.args index 6e9cf15a14..b82689f828 100644 --- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-readonly.x86_64-latest.a= rgs +++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-readonly.x86_64-latest.a= rgs @@ -16,7 +16,9 @@ XDG_CONFIG_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.config \ -overcommit mem-lock=3Doff \ -smp 2,sockets=3D2,dies=3D1,cores=3D1,threads=3D1 \ -object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":22439526= 4}' \ --numa node,nodeid=3D0,cpus=3D0-1,memdev=3Dram-node0 \ +-numa node,nodeid=3D0,memdev=3Dram-node0 \ +-numa cpu,node-id=3D0,socket-id=3D0,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D0,socket-id=3D1,core-id=3D0,thread-id=3D0 \ -object '{"qom-type":"memory-backend-file","id":"memnvdimm0","mem-path":"/= tmp/nvdimm","share":false,"prealloc":true,"size":536870912}' \ -device nvdimm,node=3D0,unarmed=3Don,memdev=3Dmemnvdimm0,id=3Dnvdimm0,slot= =3D0 \ -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm.x86_64-latest.arg= s b/tests/qemuxml2argvdata/memory-hotplug-nvdimm.x86_64-latest.args index 789f4fa11f..a05dcbc66b 100644 --- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm.x86_64-latest.args +++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm.x86_64-latest.args @@ -16,7 +16,9 @@ XDG_CONFIG_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.config \ -overcommit mem-lock=3Doff \ -smp 2,sockets=3D2,dies=3D1,cores=3D1,threads=3D1 \ -object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":10737418= 24}' \ --numa node,nodeid=3D0,cpus=3D0-1,memdev=3Dram-node0 \ +-numa node,nodeid=3D0,memdev=3Dram-node0 \ +-numa cpu,node-id=3D0,socket-id=3D0,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D0,socket-id=3D1,core-id=3D0,thread-id=3D0 \ -object '{"qom-type":"memory-backend-file","id":"memnvdimm0","mem-path":"/= tmp/nvdimm","prealloc":true,"size":536870912}' \ -device nvdimm,node=3D0,memdev=3Dmemnvdimm0,id=3Dnvdimm0,slot=3D0 \ -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ diff --git a/tests/qemuxml2argvdata/memory-hotplug-virtio-pmem.x86_64-5.2.0= .args b/tests/qemuxml2argvdata/memory-hotplug-virtio-pmem.x86_64-5.2.0.args index 969e2dbd7d..9f0b7a4007 100644 --- a/tests/qemuxml2argvdata/memory-hotplug-virtio-pmem.x86_64-5.2.0.args +++ b/tests/qemuxml2argvdata/memory-hotplug-virtio-pmem.x86_64-5.2.0.args @@ -16,7 +16,9 @@ XDG_CONFIG_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.config \ -overcommit mem-lock=3Doff \ -smp 2,sockets=3D2,dies=3D1,cores=3D1,threads=3D1 \ -object memory-backend-ram,id=3Dram-node0,size=3D2145386496 \ --numa node,nodeid=3D0,cpus=3D0-1,memdev=3Dram-node0 \ +-numa node,nodeid=3D0,memdev=3Dram-node0 \ +-numa cpu,node-id=3D0,socket-id=3D0,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D0,socket-id=3D1,core-id=3D0,thread-id=3D0 \ -object memory-backend-file,id=3Dmemvirtiopmem0,mem-path=3D/tmp/virtio_pme= m,share=3Don,size=3D536870912 \ -device virtio-pmem-pci,memdev=3Dmemvirtiopmem0,id=3Dvirtiopmem0,bus=3Dpci= .0,addr=3D0x5 \ -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ diff --git a/tests/qemuxml2argvdata/memory-hotplug-virtio-pmem.x86_64-lates= t.args b/tests/qemuxml2argvdata/memory-hotplug-virtio-pmem.x86_64-latest.ar= gs index 4b1c17378b..ed785fb9d1 100644 --- a/tests/qemuxml2argvdata/memory-hotplug-virtio-pmem.x86_64-latest.args +++ b/tests/qemuxml2argvdata/memory-hotplug-virtio-pmem.x86_64-latest.args @@ -16,7 +16,9 @@ XDG_CONFIG_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.config \ -overcommit mem-lock=3Doff \ -smp 2,sockets=3D2,dies=3D1,cores=3D1,threads=3D1 \ -object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":21453864= 96}' \ --numa node,nodeid=3D0,cpus=3D0-1,memdev=3Dram-node0 \ +-numa node,nodeid=3D0,memdev=3Dram-node0 \ +-numa cpu,node-id=3D0,socket-id=3D0,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D0,socket-id=3D1,core-id=3D0,thread-id=3D0 \ -object '{"qom-type":"memory-backend-file","id":"memvirtiopmem0","mem-path= ":"/tmp/virtio_pmem","share":true,"size":536870912}' \ -device virtio-pmem-pci,memdev=3Dmemvirtiopmem0,id=3Dvirtiopmem0,bus=3Dpci= .0,addr=3D0x5 \ -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ diff --git a/tests/qemuxml2argvdata/numatune-hmat.x86_64-latest.args b/test= s/qemuxml2argvdata/numatune-hmat.x86_64-latest.args index 54ab91b09c..9c2d210963 100644 --- a/tests/qemuxml2argvdata/numatune-hmat.x86_64-latest.args +++ b/tests/qemuxml2argvdata/numatune-hmat.x86_64-latest.args @@ -16,11 +16,23 @@ XDG_CONFIG_HOME=3D/tmp/lib/domain--1-QEMUGuest/.config \ -overcommit mem-lock=3Doff \ -smp 12,sockets=3D12,cores=3D1,threads=3D1 \ -object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":21474836= 48}' \ --numa node,nodeid=3D0,cpus=3D0-3,initiator=3D0,memdev=3Dram-node0 \ +-numa node,nodeid=3D0,initiator=3D0,memdev=3Dram-node0 \ +-numa cpu,node-id=3D0,socket-id=3D0,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D0,socket-id=3D1,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D0,socket-id=3D2,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D0,socket-id=3D3,core-id=3D0,thread-id=3D0 \ -object '{"qom-type":"memory-backend-ram","id":"ram-node1","size":21474836= 48}' \ --numa node,nodeid=3D1,cpus=3D4-7,initiator=3D1,memdev=3Dram-node1 \ +-numa node,nodeid=3D1,initiator=3D1,memdev=3Dram-node1 \ +-numa cpu,node-id=3D1,socket-id=3D4,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D5,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D6,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D7,core-id=3D0,thread-id=3D0 \ -object '{"qom-type":"memory-backend-ram","id":"ram-node2","size":21474836= 48}' \ --numa node,nodeid=3D2,cpus=3D8-11,initiator=3D2,memdev=3Dram-node2 \ +-numa node,nodeid=3D2,initiator=3D2,memdev=3Dram-node2 \ +-numa cpu,node-id=3D2,socket-id=3D8,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D2,socket-id=3D9,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D2,socket-id=3D10,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D2,socket-id=3D11,core-id=3D0,thread-id=3D0 \ -object '{"qom-type":"memory-backend-ram","id":"ram-node3","size":21474836= 48}' \ -numa node,nodeid=3D3,initiator=3D0,memdev=3Dram-node3 \ -object '{"qom-type":"memory-backend-ram","id":"ram-node4","size":21474836= 48}' \ diff --git a/tests/qemuxml2argvdata/numatune-memnode-restrictive-mode.x86_6= 4-latest.args b/tests/qemuxml2argvdata/numatune-memnode-restrictive-mode.x8= 6_64-latest.args index 6d5e2eb76e..d58e6c05ed 100644 --- a/tests/qemuxml2argvdata/numatune-memnode-restrictive-mode.x86_64-lates= t.args +++ b/tests/qemuxml2argvdata/numatune-memnode-restrictive-mode.x86_64-lates= t.args @@ -16,11 +16,43 @@ XDG_CONFIG_HOME=3D/tmp/lib/domain--1-QEMUGuest/.config \ -overcommit mem-lock=3Doff \ -smp 32,sockets=3D32,cores=3D1,threads=3D1 \ -object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":20971520= }' \ --numa node,nodeid=3D0,cpus=3D0,memdev=3Dram-node0 \ +-numa node,nodeid=3D0,memdev=3Dram-node0 \ +-numa cpu,node-id=3D0,socket-id=3D0,core-id=3D0,thread-id=3D0 \ -object '{"qom-type":"memory-backend-ram","id":"ram-node1","size":67633152= 0}' \ --numa node,nodeid=3D1,cpus=3D1-27,cpus=3D29,memdev=3Dram-node1 \ +-numa node,nodeid=3D1,memdev=3Dram-node1 \ +-numa cpu,node-id=3D1,socket-id=3D1,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D2,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D3,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D4,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D5,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D6,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D7,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D8,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D9,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D10,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D11,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D12,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D13,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D14,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D15,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D16,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D17,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D18,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D19,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D20,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D21,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D22,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D23,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D24,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D25,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D26,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D27,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D29,core-id=3D0,thread-id=3D0 \ -object '{"qom-type":"memory-backend-ram","id":"ram-node2","size":24578621= 440}' \ --numa node,nodeid=3D2,cpus=3D28,cpus=3D30-31,memdev=3Dram-node2 \ +-numa node,nodeid=3D2,memdev=3Dram-node2 \ +-numa cpu,node-id=3D2,socket-id=3D28,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D2,socket-id=3D30,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D2,socket-id=3D31,core-id=3D0,thread-id=3D0 \ -uuid 9f4b6512-e73a-4a25-93e8-5307802821ce \ -display none \ -no-user-config \ diff --git a/tests/qemuxml2argvdata/numatune-memnode.x86_64-5.2.0.args b/te= sts/qemuxml2argvdata/numatune-memnode.x86_64-5.2.0.args index 23bab6fca4..92818c8eee 100644 --- a/tests/qemuxml2argvdata/numatune-memnode.x86_64-5.2.0.args +++ b/tests/qemuxml2argvdata/numatune-memnode.x86_64-5.2.0.args @@ -16,11 +16,43 @@ XDG_CONFIG_HOME=3D/tmp/lib/domain--1-QEMUGuest/.config \ -overcommit mem-lock=3Doff \ -smp 32,sockets=3D32,cores=3D1,threads=3D1 \ -object memory-backend-ram,id=3Dram-node0,size=3D20971520,host-nodes=3D3,p= olicy=3Dpreferred \ --numa node,nodeid=3D0,cpus=3D0,memdev=3Dram-node0 \ +-numa node,nodeid=3D0,memdev=3Dram-node0 \ +-numa cpu,node-id=3D0,socket-id=3D0,core-id=3D0,thread-id=3D0 \ -object memory-backend-ram,id=3Dram-node1,size=3D676331520,host-nodes=3D0-= 7,policy=3Dbind \ --numa node,nodeid=3D1,cpus=3D1-27,cpus=3D29,memdev=3Dram-node1 \ +-numa node,nodeid=3D1,memdev=3Dram-node1 \ +-numa cpu,node-id=3D1,socket-id=3D1,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D2,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D3,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D4,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D5,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D6,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D7,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D8,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D9,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D10,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D11,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D12,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D13,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D14,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D15,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D16,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D17,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D18,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D19,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D20,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D21,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D22,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D23,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D24,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D25,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D26,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D27,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D29,core-id=3D0,thread-id=3D0 \ -object memory-backend-ram,id=3Dram-node2,size=3D24578621440,host-nodes=3D= 1-2,host-nodes=3D5,host-nodes=3D7,policy=3Dbind \ --numa node,nodeid=3D2,cpus=3D28,cpus=3D30-31,memdev=3Dram-node2 \ +-numa node,nodeid=3D2,memdev=3Dram-node2 \ +-numa cpu,node-id=3D2,socket-id=3D28,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D2,socket-id=3D30,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D2,socket-id=3D31,core-id=3D0,thread-id=3D0 \ -uuid 9f4b6512-e73a-4a25-93e8-5307802821ce \ -display none \ -no-user-config \ diff --git a/tests/qemuxml2argvdata/numatune-memnode.x86_64-latest.args b/t= ests/qemuxml2argvdata/numatune-memnode.x86_64-latest.args index fa639f48fe..d32e4e3164 100644 --- a/tests/qemuxml2argvdata/numatune-memnode.x86_64-latest.args +++ b/tests/qemuxml2argvdata/numatune-memnode.x86_64-latest.args @@ -16,11 +16,43 @@ XDG_CONFIG_HOME=3D/tmp/lib/domain--1-QEMUGuest/.config \ -overcommit mem-lock=3Doff \ -smp 32,sockets=3D32,cores=3D1,threads=3D1 \ -object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":20971520= ,"host-nodes":[3],"policy":"preferred"}' \ --numa node,nodeid=3D0,cpus=3D0,memdev=3Dram-node0 \ +-numa node,nodeid=3D0,memdev=3Dram-node0 \ +-numa cpu,node-id=3D0,socket-id=3D0,core-id=3D0,thread-id=3D0 \ -object '{"qom-type":"memory-backend-ram","id":"ram-node1","size":67633152= 0,"host-nodes":[0,1,2,3,4,5,6,7],"policy":"bind"}' \ --numa node,nodeid=3D1,cpus=3D1-27,cpus=3D29,memdev=3Dram-node1 \ +-numa node,nodeid=3D1,memdev=3Dram-node1 \ +-numa cpu,node-id=3D1,socket-id=3D1,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D2,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D3,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D4,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D5,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D6,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D7,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D8,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D9,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D10,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D11,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D12,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D13,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D14,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D15,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D16,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D17,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D18,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D19,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D20,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D21,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D22,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D23,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D24,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D25,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D26,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D27,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D1,socket-id=3D29,core-id=3D0,thread-id=3D0 \ -object '{"qom-type":"memory-backend-ram","id":"ram-node2","size":24578621= 440,"host-nodes":[1,2,5,7],"policy":"bind"}' \ --numa node,nodeid=3D2,cpus=3D28,cpus=3D30-31,memdev=3Dram-node2 \ +-numa node,nodeid=3D2,memdev=3Dram-node2 \ +-numa cpu,node-id=3D2,socket-id=3D28,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D2,socket-id=3D30,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D2,socket-id=3D31,core-id=3D0,thread-id=3D0 \ -uuid 9f4b6512-e73a-4a25-93e8-5307802821ce \ -display none \ -no-user-config \ diff --git a/tests/qemuxml2argvdata/vhost-user-fs-fd-memory.x86_64-latest.a= rgs b/tests/qemuxml2argvdata/vhost-user-fs-fd-memory.x86_64-latest.args index 6311f8f65e..68b0fcaae9 100644 --- a/tests/qemuxml2argvdata/vhost-user-fs-fd-memory.x86_64-latest.args +++ b/tests/qemuxml2argvdata/vhost-user-fs-fd-memory.x86_64-latest.args @@ -16,7 +16,9 @@ XDG_CONFIG_HOME=3D/tmp/lib/domain--1-guest/.config \ -overcommit mem-lock=3Doff \ -smp 2,sockets=3D2,cores=3D1,threads=3D1 \ -object '{"qom-type":"memory-backend-file","id":"ram-node0","mem-path":"/v= ar/lib/libvirt/qemu/ram/-1-guest/ram-node0","share":true,"size":15032385536= }' \ --numa node,nodeid=3D0,cpus=3D0-1,memdev=3Dram-node0 \ +-numa node,nodeid=3D0,memdev=3Dram-node0 \ +-numa cpu,node-id=3D0,socket-id=3D0,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D0,socket-id=3D1,core-id=3D0,thread-id=3D0 \ -uuid 126f2720-6f8e-45ab-a886-ec9277079a67 \ -display none \ -no-user-config \ diff --git a/tests/qemuxml2argvdata/vhost-user-fs-hugepages.x86_64-latest.a= rgs b/tests/qemuxml2argvdata/vhost-user-fs-hugepages.x86_64-latest.args index 58570592eb..f127112452 100644 --- a/tests/qemuxml2argvdata/vhost-user-fs-hugepages.x86_64-latest.args +++ b/tests/qemuxml2argvdata/vhost-user-fs-hugepages.x86_64-latest.args @@ -16,7 +16,9 @@ XDG_CONFIG_HOME=3D/tmp/lib/domain--1-guest/.config \ -overcommit mem-lock=3Doff \ -smp 2,sockets=3D2,cores=3D1,threads=3D1 \ -object '{"qom-type":"memory-backend-file","id":"ram-node0","mem-path":"/d= ev/hugepages2M/libvirt/qemu/-1-guest","share":true,"prealloc":true,"size":2= 147483648}' \ --numa node,nodeid=3D0,cpus=3D0-1,memdev=3Dram-node0 \ +-numa node,nodeid=3D0,memdev=3Dram-node0 \ +-numa cpu,node-id=3D0,socket-id=3D0,core-id=3D0,thread-id=3D0 \ +-numa cpu,node-id=3D0,socket-id=3D1,core-id=3D0,thread-id=3D0 \ -uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \ -display none \ -no-user-config \ diff --git a/tests/qemuxml2argvdata/vhost-user-gpu-secondary.x86_64-latest.= args b/tests/qemuxml2argvdata/vhost-user-gpu-secondary.x86_64-latest.args index 6df0365e76..87d0f430c2 100644 --- a/tests/qemuxml2argvdata/vhost-user-gpu-secondary.x86_64-latest.args +++ b/tests/qemuxml2argvdata/vhost-user-gpu-secondary.x86_64-latest.args @@ -16,7 +16,8 @@ XDG_CONFIG_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.config \ -overcommit mem-lock=3Doff \ -smp 1,sockets=3D1,cores=3D1,threads=3D1 \ -object '{"qom-type":"memory-backend-memfd","id":"ram-node0","share":true,= "size":224395264}' \ --numa node,nodeid=3D0,cpus=3D0,memdev=3Dram-node0 \ +-numa node,nodeid=3D0,memdev=3Dram-node0 \ +-numa cpu,node-id=3D0,socket-id=3D0,core-id=3D0,thread-id=3D0 \ -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ -display none \ -no-user-config \ diff --git a/tests/qemuxml2argvdata/vhost-user-vga.x86_64-latest.args b/tes= ts/qemuxml2argvdata/vhost-user-vga.x86_64-latest.args index 0bdd98d3b6..8c463496a1 100644 --- a/tests/qemuxml2argvdata/vhost-user-vga.x86_64-latest.args +++ b/tests/qemuxml2argvdata/vhost-user-vga.x86_64-latest.args @@ -16,7 +16,8 @@ XDG_CONFIG_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.config \ -overcommit mem-lock=3Doff \ -smp 1,sockets=3D1,cores=3D1,threads=3D1 \ -object '{"qom-type":"memory-backend-memfd","id":"ram-node0","share":true,= "size":224395264}' \ --numa node,nodeid=3D0,cpus=3D0,memdev=3Dram-node0 \ +-numa node,nodeid=3D0,memdev=3Dram-node0 \ +-numa cpu,node-id=3D0,socket-id=3D0,core-id=3D0,thread-id=3D0 \ -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ -display none \ -no-user-config \ --=20 2.32.0