From nobody Sun Feb 8 04:52:27 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.81 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=1572960516; cv=none; d=zoho.com; s=zohoarc; b=gZEOiqV1l5wPXixre5op9ERtSwSSN/VAmNtVKI9cWXN57AMHCMvoH7Gn2JgYzSxFcwUE6eAMGWwQG1G8hIMyImBw+h6BF64Wz3JL/bvQDvYITudxCHY7KdzHnxrCR+0Yw+Pj05h+1k5/amngzmDculiMP19rV8LQPSPu9TWQG6s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572960516; h=Content-Type:Content-Transfer-Encoding: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=d5oJXghjIqkMr4/CA0tKOvWUK/3LYuyNf3/FZ7CV09U=; b=aBdoGIFeebQ7TDCaaa0P5svYVpFyeh1bbdC7GTMH0uySwAGjBBtx3dI+lthSORx2AA8Ars/JpmBJxRzaiOopdIu97krRxxzcuw5Ez966vCRcb7DTm4nlwv463xaqWqB//Ak7YmV2vLDo45CSdnZG2MmwCN4LdP+w9lE8P1De4qE= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1572960516148116.21578212828513; Tue, 5 Nov 2019 05:28:36 -0800 (PST) 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-189-KIqm5EmVNnGHLPEEMeBGwg-1; Tue, 05 Nov 2019 08:28:33 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id CA439800A02; Tue, 5 Nov 2019 13:28:27 +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 977A9600D5; Tue, 5 Nov 2019 13:28:27 +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 EE8A54E567; Tue, 5 Nov 2019 13:28:26 +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 xA5DRx26003932 for ; Tue, 5 Nov 2019 08:27:59 -0500 Received: by smtp.corp.redhat.com (Postfix) id 5AF435D727; Tue, 5 Nov 2019 13:27:59 +0000 (UTC) Received: from virval.usersys.redhat.com (unknown [10.43.2.188]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0B5095D726 for ; Tue, 5 Nov 2019 13:27:59 +0000 (UTC) Received: by virval.usersys.redhat.com (Postfix, from userid 500) id 94671105B2D; Tue, 5 Nov 2019 14:27:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572960515; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=d5oJXghjIqkMr4/CA0tKOvWUK/3LYuyNf3/FZ7CV09U=; b=fgKfmBxX0Mf44qGHMYupy7Vg6erZkSxMtbZRtlCjOw32rR7/qLyJ9bGfeirIu8QIbjnrYG LowZsVCrvyfhTJNtY5Y9xKLDUHCfqUzvL0ne8BM2Q9xp0A/YgYTKBrExsUEhvc7W52+CYX evZWnBegIUMCgKg+B1jzXj+awlfJ1W8= From: Jiri Denemark To: libvir-list@redhat.com Date: Tue, 5 Nov 2019 14:27:14 +0100 Message-Id: <8d372eb937486d770d2d5c0239bbc249aed67d04.1572958254.git.jdenemar@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 Subject: [libvirt] [PATCH v3 16/52] qemu: Rename virQEMUCaps{Get, Fetch}CPUDefinitions 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.11 X-MC-Unique: KIqm5EmVNnGHLPEEMeBGwg-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" The functions return virDomainCapsCPUModelsPtr and thus they should be called *CPUModels for consistency. Functions called *CPUDefinitions will work on qemuMonitorCPUDefsPtr. Signed-off-by: Jiri Denemark Reviewed-by: J=C3=A1n Tomko --- Notes: Version 2: - new patch =20 Version 3: - no change src/qemu/qemu_capabilities.c | 28 ++++++++++++++-------------- src/qemu/qemu_capabilities.h | 14 +++++++------- src/qemu/qemu_driver.c | 2 +- src/qemu/qemu_process.c | 4 ++-- tests/cputest.c | 2 +- 5 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 1497c4f645..dfffc45d1d 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -1911,10 +1911,10 @@ virQEMUCapsCPUDefsToModels(qemuMonitorCPUDefsPtr de= fs, =20 =20 virDomainCapsCPUModelsPtr -virQEMUCapsGetCPUDefinitions(virQEMUCapsPtr qemuCaps, - virDomainVirtType type, - const char **modelWhitelist, - const char **modelBlacklist) +virQEMUCapsGetCPUModels(virQEMUCapsPtr qemuCaps, + virDomainVirtType type, + const char **modelWhitelist, + const char **modelBlacklist) { virDomainCapsCPUModelsPtr cpuModels; =20 @@ -2472,9 +2472,9 @@ virQEMUCapsProbeQMPMachineProps(virQEMUCapsPtr qemuCa= ps, =20 =20 int -virQEMUCapsFetchCPUDefinitions(qemuMonitorPtr mon, - virArch arch, - virDomainCapsCPUModelsPtr *cpuModels) +virQEMUCapsFetchCPUModels(qemuMonitorPtr mon, + virArch arch, + virDomainCapsCPUModelsPtr *cpuModels) { g_autoptr(qemuMonitorCPUDefs) defs =3D NULL; size_t i; @@ -2524,7 +2524,7 @@ virQEMUCapsProbeQMPCPUDefinitions(virQEMUCapsPtr qemu= Caps, if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_QUERY_CPU_DEFINITIONS)) return 0; =20 - if (virQEMUCapsFetchCPUDefinitions(mon, qemuCaps->arch, &models) < 0) + if (virQEMUCapsFetchCPUModels(mon, qemuCaps->arch, &models) < 0) return -1; =20 if (tcg || !virQEMUCapsGet(qemuCaps, QEMU_CAPS_KVM)) @@ -3145,7 +3145,7 @@ virQEMUCapsInitCPUModelX86(virQEMUCapsPtr qemuCaps, if (!(data =3D virQEMUCapsGetCPUModelX86Data(qemuCaps, model, migratab= le))) goto cleanup; =20 - cpuModels =3D virQEMUCapsGetCPUDefinitions(qemuCaps, type, NULL, NULL); + cpuModels =3D virQEMUCapsGetCPUModels(qemuCaps, type, NULL, NULL); =20 if (cpuDecode(cpu, data, cpuModels) < 0) goto cleanup; @@ -3234,7 +3234,7 @@ virQEMUCapsInitHostCPUModel(virQEMUCapsPtr qemuCaps, =20 VIR_DEBUG("No host CPU model info from QEMU; probing host CPU dire= ctly"); =20 - cpuModels =3D virQEMUCapsGetCPUDefinitions(qemuCaps, type, NULL, N= ULL); + cpuModels =3D virQEMUCapsGetCPUModels(qemuCaps, type, NULL, NULL); hostCPU =3D virQEMUCapsProbeHostCPU(hostArch, cpuModels); =20 if (!hostCPU || @@ -5281,10 +5281,10 @@ virQEMUCapsFillDomainCPUCaps(virCapsPtr caps, VIR_AUTOSTRINGLIST models =3D NULL; =20 if (virCPUGetModels(domCaps->arch, &models) >=3D 0) { - domCaps->cpu.custom =3D virQEMUCapsGetCPUDefinitions(qemuCaps, - domCaps->vi= rttype, - (const char= **)models, - blacklist); + domCaps->cpu.custom =3D virQEMUCapsGetCPUModels(qemuCaps, + domCaps->virttyp= e, + (const char **)m= odels, + blacklist); } else { domCaps->cpu.custom =3D NULL; } diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index ba3fe3d2b6..923706c3bf 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -569,13 +569,13 @@ int virQEMUCapsAddCPUDefinitions(virQEMUCapsPtr qemuC= aps, const char **name, size_t count, virDomainCapsCPUUsable usable); -virDomainCapsCPUModelsPtr virQEMUCapsGetCPUDefinitions(virQEMUCapsPtr qemu= Caps, - virDomainVirtType t= ype, - const char **modelW= hitelist, - const char **modelB= lacklist); -int virQEMUCapsFetchCPUDefinitions(qemuMonitorPtr mon, - virArch arch, - virDomainCapsCPUModelsPtr *cpuModels); +virDomainCapsCPUModelsPtr virQEMUCapsGetCPUModels(virQEMUCapsPtr qemuCaps, + virDomainVirtType type, + const char **modelWhitel= ist, + const char **modelBlackl= ist); +int virQEMUCapsFetchCPUModels(qemuMonitorPtr mon, + virArch arch, + virDomainCapsCPUModelsPtr *cpuModels); =20 typedef enum { /* Host CPU definition reported in domain capabilities. */ diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 76787bf56a..8240a6e74e 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -13730,7 +13730,7 @@ qemuConnectBaselineHypervisorCPU(virConnectPtr conn, if (!qemuCaps) goto cleanup; =20 - if (!(cpuModels =3D virQEMUCapsGetCPUDefinitions(qemuCaps, virttype, N= ULL, NULL)) || + if (!(cpuModels =3D virQEMUCapsGetCPUModels(qemuCaps, virttype, NULL, = NULL)) || cpuModels->nmodels =3D=3D 0) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, _("QEMU '%s' does not support any CPU models for " diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index bdd01993a2..2ea524ab33 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -4358,7 +4358,7 @@ qemuProcessFetchCPUDefinitions(virQEMUDriverPtr drive= r, if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0) goto error; =20 - rc =3D virQEMUCapsFetchCPUDefinitions(priv->mon, vm->def->os.arch, &mo= dels); + rc =3D virQEMUCapsFetchCPUModels(priv->mon, vm->def->os.arch, &models); =20 if (qemuDomainObjExitMonitor(driver, vm) < 0 || rc < 0) goto error; @@ -6127,7 +6127,7 @@ qemuProcessUpdateGuestCPU(virDomainDefPtr def, VIR_QEMU_CAPS_HOST_CPU_MI= GRATABLE)) < 0) return -1; =20 - cpuModels =3D virQEMUCapsGetCPUDefinitions(qemuCaps, def->virtType= , NULL, NULL); + cpuModels =3D virQEMUCapsGetCPUModels(qemuCaps, def->virtType, NUL= L, NULL); =20 if (virCPUTranslate(def->os.arch, def->cpu, cpuModels) < 0) return -1; diff --git a/tests/cputest.c b/tests/cputest.c index 11c061e37a..ef2d4e28df 100644 --- a/tests/cputest.c +++ b/tests/cputest.c @@ -548,7 +548,7 @@ cpuTestGetCPUModels(const struct data *data, if (!(qemuCaps =3D cpuTestMakeQEMUCaps(data))) return -1; =20 - *models =3D virQEMUCapsGetCPUDefinitions(qemuCaps, VIR_DOMAIN_VIRT_KVM= , NULL, NULL); + *models =3D virQEMUCapsGetCPUModels(qemuCaps, VIR_DOMAIN_VIRT_KVM, NUL= L, NULL); =20 virObjectUnref(qemuCaps); =20 --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list