From nobody Sun Apr 28 23:44:39 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 152554254822389.40569795473641; Sat, 5 May 2018 10:49:08 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4B3C35D678; Sat, 5 May 2018 17:49:06 +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 53F55601A6; Sat, 5 May 2018 17:49:04 +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 8F6B9180BADB; Sat, 5 May 2018 17:49:00 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w45HmwqP004339 for ; Sat, 5 May 2018 13:48:58 -0400 Received: by smtp.corp.redhat.com (Postfix) id 74B947C3B; Sat, 5 May 2018 17:48:58 +0000 (UTC) Received: from cv1.home.network (ovpn-120-127.rdu2.redhat.com [10.10.120.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8317A7C38; Sat, 5 May 2018 17:48:57 +0000 (UTC) From: Chris Venteicher To: libvir-list@redhat.com Date: Sat, 5 May 2018 12:48:43 -0500 Message-Id: <20180505174849.31136-2-cventeic@redhat.com> In-Reply-To: <20180505174849.31136-1-cventeic@redhat.com> References: <20180505174849.31136-1-cventeic@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Cc: walling@linux.ibm.com, Chris Venteicher , david@redhat.com Subject: [libvirt] [PATCHv1 1/7] qemu_monitor_json: Properties optional in QMP JSON for CPUModelInfo 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.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Sat, 05 May 2018 17:49:06 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Allow case where props not present in JSON for CPUModelInfo. Check for NULL input. Update comments to show JSON examples for more typical S390x usecase. --- src/qemu/qemu_monitor_json.c | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index cb17cf53bc..92db267353 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -5358,7 +5358,7 @@ qemuMonitorJSONParseCPUModelProperty(const char *key, } =20 =20 -/* model_json: {"name": "IvyBridge", "props": {}} +/* model_json: {"name": "z13-base", "props": {}} */ static virJSONValuePtr qemuMonitorJSONBuildCPUModelInfoToJSON(qemuMonitorCPUModelInfoPtr model) @@ -5367,6 +5367,9 @@ qemuMonitorJSONBuildCPUModelInfoToJSON(qemuMonitorCPU= ModelInfoPtr model) virJSONValuePtr model_json =3D NULL; size_t i; =20 + if (!model) + goto cleanup; + if (!(cpu_props =3D virJSONValueNewObject())) goto cleanup; =20 @@ -5408,7 +5411,7 @@ qemuMonitorJSONBuildCPUModelInfoToJSON(qemuMonitorCPU= ModelInfoPtr model) } =20 =20 -/* model_json: {"name": "IvyBridge", "props": {}} +/* model_json: {"name": "z13-base", "props": {}} */ static qemuMonitorCPUModelInfoPtr qemuMonitorJSONBuildCPUModelInfoFromJSON(virJSONValuePtr cpu_model) @@ -5424,26 +5427,22 @@ qemuMonitorJSONBuildCPUModelInfoFromJSON(virJSONVal= uePtr cpu_model) goto cleanup; } =20 - if (!(cpu_props =3D virJSONValueObjectGetObject(cpu_model, "props"))) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("Parsed JSON reply missing 'props'")); - goto cleanup; - } - if (VIR_ALLOC(machine_model) < 0) goto cleanup; =20 if (VIR_STRDUP(machine_model->name, cpu_name) < 0) goto cleanup; =20 - if (VIR_ALLOC_N(machine_model->props, - virJSONValueObjectKeysNumber(cpu_props)) < 0) - goto cleanup; + if ((cpu_props =3D virJSONValueObjectGetObject(cpu_model, "props"))) { + if (VIR_ALLOC_N(machine_model->props, + virJSONValueObjectKeysNumber(cpu_props)) < 0) + goto cleanup; =20 - if (virJSONValueObjectForeachKeyValue(cpu_props, - qemuMonitorJSONParseCPUModelProp= erty, - machine_model) < 0) - goto cleanup; + if (virJSONValueObjectForeachKeyValue(cpu_props, + qemuMonitorJSONParseCPUModel= Property, + machine_model) < 0) + goto cleanup; + } =20 VIR_STEAL_PTR(model, machine_model); =20 @@ -5586,11 +5585,8 @@ qemuMonitorJSONGetCPUModelBaseline(qemuMonitorPtr mo= n, if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0) goto cleanup; =20 - /* Urgh, some QEMU architectures have query-cpu-model-baseline - * command but return 'GenericError' with string "Not supported", - * instead of simply omitting the command entirely - */ if (qemuMonitorJSONHasError(reply, "GenericError")) { + /* QEMU does not support query-cpu-model-baseline or cpu model */ ret =3D 0; goto cleanup; } --=20 2.14.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 23:44:39 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 1525542571632602.522738174779; Sat, 5 May 2018 10:49:31 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9001330C8097; Sat, 5 May 2018 17:49:24 +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 6504930012AA; Sat, 5 May 2018 17:49:24 +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 297764CAAD; Sat, 5 May 2018 17:49:23 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w45Hmx1v004349 for ; Sat, 5 May 2018 13:48:59 -0400 Received: by smtp.corp.redhat.com (Postfix) id A96A610848C; Sat, 5 May 2018 17:48:59 +0000 (UTC) Received: from cv1.home.network (ovpn-120-127.rdu2.redhat.com [10.10.120.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id BB3BC108486; Sat, 5 May 2018 17:48:58 +0000 (UTC) From: Chris Venteicher To: libvir-list@redhat.com Date: Sat, 5 May 2018 12:48:44 -0500 Message-Id: <20180505174849.31136-3-cventeic@redhat.com> In-Reply-To: <20180505174849.31136-1-cventeic@redhat.com> References: <20180505174849.31136-1-cventeic@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Cc: walling@linux.ibm.com, Chris Venteicher , david@redhat.com Subject: [libvirt] [PATCHv1 2/7] qemu_capabilities: CPUModelInfo: XML/QMP format conversion 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.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Sat, 05 May 2018 17:49:30 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Functions converting directly between virsh XML and QMEU QMP forms of CPUModelInfo. --- src/qemu/qemu_capabilities.c | 159 +++++++++++++++++++++++++++++++++++++++= ++++ 1 file changed, 159 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 0265d83028..afce3eb2b7 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -3341,6 +3341,165 @@ virQEMUCapsLoadCache(virArch hostArch, } =20 =20 +/* + * s390x + * z13-base + * + * ... + * + * + * + * returns 0, (*model), Success + * returns 0, !(*model), Content not found + * returns -1, !(*model), Failure + */ +static int +virQEMUCapsCPUModelInfoFromXML(xmlXPathContextPtr ctxt, + const char *xpath, + qemuMonitorCPUModelInfoPtr *model) +{ + size_t i; + int ret =3D -1; + qemuMonitorCPUModelInfoPtr cpuModel =3D NULL; + xmlNodePtr *nodes =3D NULL; + xmlNodePtr oldnode =3D ctxt->node; + + VIR_DEBUG("xpath =3D%s", NULLSTR(xpath)); + + *model =3D NULL; + + /* optional xpath query for cpu node with nonerror exit on miss */ + if (xpath && !(ctxt->node =3D virXPathNode(xpath, ctxt))) { + ret =3D 0; + goto cleanup; + } + + if (!virXMLNodeNameEqual(ctxt->node, "cpu")) { + virReportError(VIR_ERR_XML_ERROR, "%s", + _("XML does not contain expected 'cpu' element")); + goto cleanup; + } + + if (VIR_ALLOC(cpuModel) < 0) + goto cleanup; + + if (!(cpuModel->name =3D virXPathString("string(./model[1])", ctxt))) { + virReportError(VIR_ERR_XML_ERROR, "%s", _("Missing CPU model name"= )); + goto cleanup; + } + + cpuModel->nprops =3D virXPathNodeSet("./feature", ctxt, &nodes); + + if (VIR_ALLOC_N(cpuModel->props, cpuModel->nprops) < 0) + goto cleanup; + + for (i =3D 0; i < cpuModel->nprops; i++) { + qemuMonitorCPUPropertyPtr prop =3D &(cpuModel->props[i]); + + prop->type =3D QEMU_MONITOR_CPU_PROPERTY_BOOLEAN; + prop->value.boolean =3D true; + prop->migratable =3D VIR_TRISTATE_BOOL_ABSENT; + + if (!(prop->name =3D virXMLPropString(nodes[i], "name"))) { + virReportError(VIR_ERR_XML_ERROR, "%s", _("Invalid CPU feature= name")); + goto cleanup; + } + } + + *model =3D qemuMonitorCPUModelInfoCopy(cpuModel); + + ret =3D 0; + + VIR_DEBUG("model->name =3D %s", NULLSTR((*model)->name)); + + cleanup: + ctxt->node =3D oldnode; + VIR_FREE(nodes); + qemuMonitorCPUModelInfoFree(cpuModel); + return ret; +} + + +/* + * returns 0, (*model), Success + * returns 0, !(*model), Content not found + * returns -1, !(*model), Failure + */ +static int +virQEMUCapsLoadCPUModelInfoFromXMLString(const char *xml, + const char *xpath, + qemuMonitorCPUModelInfoPtr *model) +{ + int ret =3D -1; + + xmlDocPtr doc =3D NULL; + xmlXPathContextPtr ctxt =3D NULL; + + *model =3D NULL; + + VIR_DEBUG("input =3D %s", NULLSTR(xml)); + + if (!(doc =3D virXMLParseStringCtxt(xml, _("(CPU_definition)"), &ctxt)= )) { + virReportError(VIR_ERR_INVALID_ARG, "%s", _("missing CPU definitio= n")); + goto cleanup; + } + + if (virQEMUCapsCPUModelInfoFromXML(ctxt, xpath, model) < 0) { + virReportError(VIR_ERR_XML_ERROR, "%s", + _("XML does not contain expected 'cpu' element")); + goto cleanup; + } + + ret =3D 0; + + cleanup: + xmlXPathFreeContext(ctxt); + xmlFreeDoc(doc); + + return ret; +} + + +/* + * z13-base + * + * + * + */ +static void +virQEMUCapsCPUModelInfoToXML(qemuMonitorCPUModelInfoPtr model, virBufferPt= r buf) +{ + size_t i; + + if (!model) + return; + + virBufferAddLit(buf, "\n"); + + virBufferAdjustIndent(buf, 2); + + virBufferAsprintf(buf, "%s\n", model->name); + + for (i =3D 0; i < model->nprops; i++) { + qemuMonitorCPUPropertyPtr prop =3D &(model->props[i]); + + virBufferAsprintf(buf, "\= n", + prop->name); + } + + virBufferAdjustIndent(buf, -2); + + virBufferAddLit(buf, "\n"); +} + + +/* + * + * + * ... + * + * + */ static void virQEMUCapsFormatHostCPUModelInfo(virQEMUCapsPtr qemuCaps, virBufferPtr buf, --=20 2.14.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 23:44:39 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 1525542554465602.9392023400235; Sat, 5 May 2018 10:49:14 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7F4D483F46; Sat, 5 May 2018 17:49:07 +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 181175C20D; Sat, 5 May 2018 17:49:06 +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 A7F4A180BAE5; Sat, 5 May 2018 17:49:04 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w45Hn1pr004359 for ; Sat, 5 May 2018 13:49:01 -0400 Received: by smtp.corp.redhat.com (Postfix) id E1F0E7C37; Sat, 5 May 2018 17:49:00 +0000 (UTC) Received: from cv1.home.network (ovpn-120-127.rdu2.redhat.com [10.10.120.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id F30F6108486; Sat, 5 May 2018 17:48:59 +0000 (UTC) From: Chris Venteicher To: libvir-list@redhat.com Date: Sat, 5 May 2018 12:48:45 -0500 Message-Id: <20180505174849.31136-4-cventeic@redhat.com> In-Reply-To: <20180505174849.31136-1-cventeic@redhat.com> References: <20180505174849.31136-1-cventeic@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Cc: walling@linux.ibm.com, Chris Venteicher , david@redhat.com Subject: [libvirt] [PATCHv1 3/7] qemu_capabilities: Start and connect to QEMU 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.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Sat, 05 May 2018 17:49:13 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Start and connect to QEMU so QMP commands can be performed. Isolates code for starting QEMU and establishing Monitor connections from code for obtaining capabilities so that arbitrary QMP commands can be exchanged with QEMU. --- src/qemu/qemu_capabilities.c | 59 ++++++++++++++++++++++++++++++++++++++++= ++++ 1 file changed, 59 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index afce3eb2b7..097985cbe7 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -4303,6 +4303,65 @@ virQEMUCapsInitQMPCommandRun(virQEMUCapsInitQMPComma= ndPtr cmd, } =20 =20 +/* Start and connect to QEMU so QMP commands can be performed. + */ +static virQEMUCapsInitQMPCommandPtr +virQEMUCapsSpinUpQemu(const char *exec, + const char *libDir, uid_t runUid, gid_t runGid, + bool forceTCG) +{ + virQEMUCapsInitQMPCommandPtr cmd =3D NULL; + virQEMUCapsInitQMPCommandPtr rtn_cmd =3D NULL; + char *binary =3D NULL; + + if (exec) { + if (VIR_STRDUP(binary, exec) < 0) + goto cleanup; + } else { + /* Check for existence of base emulator, or alternate base + * which can be used with magic cpu choice + */ + virArch arch =3D virArchFromHost(); + binary =3D virQEMUCapsFindBinaryForArch(arch, arch); + } + + VIR_DEBUG("binary=3D%s", binary); + + /* Make sure the binary we are about to try exec'ing exists. + * Technically we could catch the exec() failure, but that's + * in a sub-process so it's hard to feed back a useful error. + */ + if (!virFileIsExecutable(binary)) { + virReportSystemError(errno, _("QEMU binary %s is not executable"), + binary); + goto cleanup; + } + + if (!(cmd =3D virQEMUCapsInitQMPCommandNew(binary, libDir, + runUid, runGid, NULL))) + goto cleanup; + + if ((virQEMUCapsInitQMPCommandRun(cmd, forceTCG)) < 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Error starting QEM= U")); + goto cleanup; + } + + if (!(cmd->mon)) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("Error connecting to QEMU")); + goto cleanup; + } + + VIR_STEAL_PTR(rtn_cmd, cmd); + + cleanup: + virQEMUCapsInitQMPCommandFree(cmd); + VIR_FREE(binary); + + return rtn_cmd; +} + + static int virQEMUCapsInitQMP(virQEMUCapsPtr qemuCaps, const char *libDir, --=20 2.14.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 23:44:39 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 1525542567004313.41003738350935; Sat, 5 May 2018 10:49:27 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3175E4E4C2; Sat, 5 May 2018 17:49:25 +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 033D4601A6; Sat, 5 May 2018 17:49:24 +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 B543E4CAAF; Sat, 5 May 2018 17:49:23 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w45Hn18u004365 for ; Sat, 5 May 2018 13:49:01 -0400 Received: by smtp.corp.redhat.com (Postfix) id 5E33C7C37; Sat, 5 May 2018 17:49:01 +0000 (UTC) Received: from cv1.home.network (ovpn-120-127.rdu2.redhat.com [10.10.120.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id 08D4D7C38; Sat, 5 May 2018 17:49:00 +0000 (UTC) From: Chris Venteicher To: libvir-list@redhat.com Date: Sat, 5 May 2018 12:48:46 -0500 Message-Id: <20180505174849.31136-5-cventeic@redhat.com> In-Reply-To: <20180505174849.31136-1-cventeic@redhat.com> References: <20180505174849.31136-1-cventeic@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Cc: walling@linux.ibm.com, Chris Venteicher , david@redhat.com Subject: [libvirt] [PATCHv1 4/7] qemu_capabilities: Baseline CPUModel via QEMU 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.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Sat, 05 May 2018 17:49:25 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Spinup QEMU instance and complete QMP query-cpu-model-baseline exchanges to determine CPUModel Baseline. query-cpu-model-baseline only compares two CPUModels so multiple exchanges are needed to evaluate more than two CPUModels. --- src/qemu/qemu_capabilities.c | 132 +++++++++++++++++++++++++++++++++++++++= ++++ src/qemu/qemu_capabilities.h | 9 +++ 2 files changed, 141 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 097985cbe7..9ffbf91a90 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -5122,3 +5122,135 @@ virQEMUCapsSetMicrocodeVersion(virQEMUCapsPtr qemuC= aps, { qemuCaps->microcodeVersion =3D microcodeVersion; } + + +/* in: + * + * + * s390x + * z13-base + * + * ... + * + * + * + * s390x + * z114-base + * + * ... + * + * + * + * + * out: + * + * z13-base + * + * + * + * + * (ret=3D=3D0) && (baseline.len =3D=3D 0) if baseline not supported by QE= MU + */ +int +virQEMUCapsQMPBaselineCPUModel(char *exec, + const char *libDir, + uid_t runUid, + gid_t runGid, + const char **xmlCPUs, + unsigned int ncpus, + bool migratable, + virBufferPtr baseline) +{ + qemuMonitorCPUModelInfoPtr model_baseline =3D NULL; + qemuMonitorCPUModelInfoPtr new_model_baseline =3D NULL; + qemuMonitorCPUModelInfoPtr model_b =3D NULL; + virQEMUCapsInitQMPCommandPtr cmd =3D NULL; + virBuffer buf =3D VIR_BUFFER_INITIALIZER; + bool forceTCG =3D false; + int ret =3D -1; + size_t i; + + VIR_DEBUG("ncpus=3D%i, migratable=3D%i", ncpus, migratable); + + if (!(cmd =3D virQEMUCapsSpinUpQemu(exec, libDir, runUid, runGid, forc= eTCG))) + goto cleanup; + + if (!(cmd->mon)) { + /* Not connected to QEMU (monitor) */ + VIR_DEBUG("QEMU failed to initialize error=3D%s", virGetLastErrorM= essage()); + goto cleanup; + } + + /* QEMU requires qmp_capabilities exchange first */ + if (qemuMonitorSetCapabilities(cmd->mon) < 0) { + VIR_DEBUG("Failed to set monitor capabilities %s", + virGetLastErrorMessage()); + goto cleanup; + } + + if (!xmlCPUs && ncpus !=3D 0) { + virReportError(VIR_ERR_INVALID_ARG, "%s", + _("nonzero ncpus doesn't match with NULL xmlCPUs")); + goto cleanup; + } + + if (ncpus < 2) { + virReportError(VIR_ERR_INVALID_ARG, "%s", _("baseline < 2 CPUs ")); + goto cleanup; + } + + if (virQEMUCapsLoadCPUModelInfoFromXMLString(xmlCPUs[0], "//cpu", + &model_baseline) < 0) + goto cleanup; + + VIR_DEBUG("xmlCPUs[0] =3D %s", xmlCPUs[0]); + + for (i =3D 1; i < ncpus; i++) { + + VIR_DEBUG("xmlCPUs[%lu] =3D %s", i, xmlCPUs[i]); + + if (virQEMUCapsLoadCPUModelInfoFromXMLString(xmlCPUs[i], "//cpu", = &model_b) < 0) + goto cleanup; + + if (!model_baseline || !model_b) { + virReportError(VIR_ERR_INVALID_ARG, "%s", _("xmlCPU without co= ntent")); + goto cleanup; + } + + if (qemuMonitorGetCPUModelBaseline(cmd->mon, model_baseline, + model_b, &new_model_baseline) <= 0) + goto cleanup; + + if (!new_model_baseline) { + VIR_DEBUG("QEMU didn't support baseline"); + ret =3D 0; + goto cleanup; + } + + qemuMonitorCPUModelInfoFree(model_baseline); + qemuMonitorCPUModelInfoFree(model_b); + + model_b =3D NULL; + + model_baseline =3D new_model_baseline; + } + + VIR_DEBUG("model_baseline->name =3D %s", NULLSTR(model_baseline->name)= ); + + virQEMUCapsCPUModelInfoToXML(model_baseline, &buf); + + if (virBufferUse(&buf)) + virBufferAddBuffer(baseline, &buf); + + ret =3D 0; + + cleanup: + virQEMUCapsInitQMPCommandFree(cmd); + + qemuMonitorCPUModelInfoFree(model_baseline); + qemuMonitorCPUModelInfoFree(model_b); + + VIR_DEBUG("baseline =3D %s", virBufferCurrentContent(baseline)); + + return ret; +} diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 8da18a8063..2d3e8ce2ad 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -536,6 +536,15 @@ int virQEMUCapsGetMachineTypesCaps(virQEMUCapsPtr qemu= Caps, void virQEMUCapsFilterByMachineType(virQEMUCapsPtr qemuCaps, const char *machineType); =20 +int virQEMUCapsQMPBaselineCPUModel(char *exec, + const char *libDir, + uid_t runUid, + gid_t runGid, + const char **xmlCPUs, + unsigned int ncpus, + bool migratable, + virBufferPtr baseline); + virFileCachePtr virQEMUCapsCacheNew(const char *libDir, const char *cacheDir, uid_t uid, --=20 2.14.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 23:44:39 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 1525542571431215.17449241464533; Sat, 5 May 2018 10:49:31 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id AAA3C4E4F3; Sat, 5 May 2018 17:49:26 +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 7CCE6100197A; Sat, 5 May 2018 17:49:25 +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 3D0C8180BAE6; Sat, 5 May 2018 17:49:25 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w45Hn1hM004373 for ; Sat, 5 May 2018 13:49:02 -0400 Received: by smtp.corp.redhat.com (Postfix) id CCEA57C37; Sat, 5 May 2018 17:49:01 +0000 (UTC) Received: from cv1.home.network (ovpn-120-127.rdu2.redhat.com [10.10.120.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id 77CF410848C; Sat, 5 May 2018 17:49:01 +0000 (UTC) From: Chris Venteicher To: libvir-list@redhat.com Date: Sat, 5 May 2018 12:48:47 -0500 Message-Id: <20180505174849.31136-6-cventeic@redhat.com> In-Reply-To: <20180505174849.31136-1-cventeic@redhat.com> References: <20180505174849.31136-1-cventeic@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Cc: walling@linux.ibm.com, Chris Venteicher , david@redhat.com Subject: [libvirt] [PATCHv1 5/7] qemu_capabilities: Find QEMU binary for S390 arch 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.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Sat, 05 May 2018 17:49:30 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" S390 uses qemu-kvm in /usr/libexec. --- src/qemu/qemu_capabilities.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 9ffbf91a90..ac7569679c 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -687,6 +687,11 @@ virQEMUCapsFindBinaryForArch(virArch hostarch, goto out; } =20 + /* Fourth attempt: try 'qemu-kvm' */ + if ((ret =3D virQEMUCapsFindBinary("%s", "/usr/libexec/qemu-kvm")) != =3D NULL) + goto out; + + out: return ret; } --=20 2.14.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 23:44:39 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 152554257163657.249304797367586; Sat, 5 May 2018 10:49:31 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0A1EF30B7A04; Sat, 5 May 2018 17:49:30 +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 CB2D460C8F; Sat, 5 May 2018 17:49:28 +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 88E794CAB2; Sat, 5 May 2018 17:49:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w45Hn23C004381 for ; Sat, 5 May 2018 13:49:02 -0400 Received: by smtp.corp.redhat.com (Postfix) id 47EDC7C37; Sat, 5 May 2018 17:49:02 +0000 (UTC) Received: from cv1.home.network (ovpn-120-127.rdu2.redhat.com [10.10.120.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id E6CAA7C38; Sat, 5 May 2018 17:49:01 +0000 (UTC) From: Chris Venteicher To: libvir-list@redhat.com Date: Sat, 5 May 2018 12:48:48 -0500 Message-Id: <20180505174849.31136-7-cventeic@redhat.com> In-Reply-To: <20180505174849.31136-1-cventeic@redhat.com> References: <20180505174849.31136-1-cventeic@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Cc: walling@linux.ibm.com, Chris Venteicher , david@redhat.com Subject: [libvirt] [PATCHv1 6/7] qemu_capabilities: qmperr pointer tracked in QMPCommand 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.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Sat, 05 May 2018 17:49:30 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Allow QEMU process to be started without requirement for caller to maintain handle to qmperr pointer. The handle to qmperr pointer can be stored in QMPCommand structure (new way) stored in calling function's stack (original way). --- src/qemu/qemu_capabilities.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index ac7569679c..431378cc02 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -4110,6 +4110,7 @@ struct _virQEMUCapsInitQMPCommand { uid_t runUid; gid_t runGid; char **qmperr; + char *qmperr_internal; char *monarg; char *monpath; char *pidfile; @@ -4187,7 +4188,11 @@ virQEMUCapsInitQMPCommandNew(char *binary, =20 cmd->runUid =3D runUid; cmd->runGid =3D runGid; - cmd->qmperr =3D qmperr; + + if (qmperr) + cmd->qmperr =3D qmperr; /* external storage */ + else + cmd->qmperr =3D &cmd->qmperr_internal; /* cmd internal storage */ =20 /* the ".sock" sufix is important to avoid a possible clash with a qemu * domain called "capabilities" --=20 2.14.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 23:44:39 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 1525542575671314.4652949219927; Sat, 5 May 2018 10:49:35 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 45F9E3DE3E; Sat, 5 May 2018 17:49:29 +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 0E31E5DA64; Sat, 5 May 2018 17:49:29 +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 C3F4A4CAAF; Sat, 5 May 2018 17:49:28 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w45Hn2WY004386 for ; Sat, 5 May 2018 13:49:02 -0400 Received: by smtp.corp.redhat.com (Postfix) id B62DD7C37; Sat, 5 May 2018 17:49:02 +0000 (UTC) Received: from cv1.home.network (ovpn-120-127.rdu2.redhat.com [10.10.120.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id 630667C38; Sat, 5 May 2018 17:49:02 +0000 (UTC) From: Chris Venteicher To: libvir-list@redhat.com Date: Sat, 5 May 2018 12:48:49 -0500 Message-Id: <20180505174849.31136-8-cventeic@redhat.com> In-Reply-To: <20180505174849.31136-1-cventeic@redhat.com> References: <20180505174849.31136-1-cventeic@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Cc: walling@linux.ibm.com, Chris Venteicher , david@redhat.com Subject: [libvirt] [PATCHv1 7/7] qemu_driver: Baseline CPU model using QEMU 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.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Sat, 05 May 2018 17:49:34 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" virsh cpu-baseline determines baseline from QEMU for some architectures and libvirt for others. Skip the QEMU attempt to save time on architectures QEMU baseline does not support. --- src/qemu/qemu_driver.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 83fc191085..6096d46ab5 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -13166,6 +13166,15 @@ qemuConnectBaselineCPU(virConnectPtr conn ATTRIBUT= E_UNUSED, virCPUDefPtr baseline =3D NULL; virCPUDefPtr cpu =3D NULL; char *cpustr =3D NULL; + virBuffer baseline_xml =3D VIR_BUFFER_INITIALIZER; + virArch arch =3D virArchFromHost(); + + VIR_DEBUG("ncpus=3D%i, flags=3D0x%x", ncpus, flags); + + virQEMUDriverPtr driver =3D conn->privateData; + virQEMUDriverConfigPtr cfg =3D virQEMUDriverGetConfig(driver); + + bool migratable =3D !!(flags & VIR_CONNECT_BASELINE_CPU_MIGRATABLE); =20 virCheckFlags(VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES | VIR_CONNECT_BASELINE_CPU_MIGRATABLE, NULL); @@ -13173,6 +13182,23 @@ qemuConnectBaselineCPU(virConnectPtr conn ATTRIBUT= E_UNUSED, if (virConnectBaselineCPUEnsureACL(conn) < 0) goto cleanup; =20 + + if (!ARCH_IS_S390(arch)) + goto libvirt_method; /* Avoid starting QEMU */ + + /* Try QEMU method + */ + if (virQEMUCapsQMPBaselineCPUModel(NULL, + cfg->libDir, cfg->user, cfg->group, + xmlCPUs, ncpus, migratable, &baseli= ne_xml) < 0) { + /* Content Error */ + goto cleanup; + } + + if ((cpustr =3D virBufferContentAndReset(&baseline_xml))) + goto done; + + libvirt_method: if (!(cpus =3D virCPUDefListParse(xmlCPUs, ncpus, VIR_CPU_TYPE_HOST))) goto cleanup; =20 @@ -13199,6 +13225,9 @@ qemuConnectBaselineCPU(virConnectPtr conn ATTRIBUTE= _UNUSED, virCPUDefFree(baseline); virCPUDefFree(cpu); =20 + done: + VIR_DEBUG("qemu cpustr =3D %s", NULLSTR(cpustr)); + return cpustr; } =20 --=20 2.14.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list