From nobody Sun Feb 8 18:18:37 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.120 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=1572960723; cv=none; d=zoho.com; s=zohoarc; b=VihD75ydLJdiURtTQDNOrR67cLa50cnUqFwdsx8Roy+QE+JeKKKwMVicjaTr+izC4zh8u635vkECfZDw/Zd2SVf8bW7cVM6/WkBtw8l3VsitSOyMUqp4up74t+MAqMIi6oEog1mDbAfVon+VSAxW/DUSzpSL2eGA0pg7RSs9N9I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572960723; 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=17Y3de1ERLjZMLdq+9RF7gGbwnFU1Sxp+ghBzfqRC5o=; b=YmTmAbqApIprXUtbk4zNV4CkHaSEXz4EGrkdmy7CfDhpyEluybGVoxWqzIXylsa/8OXfKFhkdlQNnRqypI3nNo1Rv/TLZbnOeWnq5aQq2iPXuJUFKYkhRWpSY2ClTaiGuCsmos5YUmWgRTwzK67djLuFHxIbEIY1R+E6xrdjMXs= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.120 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-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1572960723345402.75538325363186; Tue, 5 Nov 2019 05:32:03 -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-329-vJ1x6NMGMEKd44QLUrn_Lg-1; Tue, 05 Nov 2019 08:28:41 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5413D801E7D; Tue, 5 Nov 2019 13:28:36 +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 2986260FC4; Tue, 5 Nov 2019 13:28:36 +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 DA8414E579; Tue, 5 Nov 2019 13:28:35 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xA5DS0bE004008 for ; Tue, 5 Nov 2019 08:28:00 -0500 Received: by smtp.corp.redhat.com (Postfix) id C422B5C553; Tue, 5 Nov 2019 13:28:00 +0000 (UTC) Received: from virval.usersys.redhat.com (unknown [10.43.2.188]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9A2B05C554 for ; Tue, 5 Nov 2019 13:28:00 +0000 (UTC) Received: by virval.usersys.redhat.com (Postfix, from userid 500) id D1EB5105D76; 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=1572960722; 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=17Y3de1ERLjZMLdq+9RF7gGbwnFU1Sxp+ghBzfqRC5o=; b=ZvcsTnr+ygj2MCxSD7d/nrd60u9YUSmG4n8+KWZUpV6RdxCtaoTx7LFxuVNNLmPUGTtA1R 7nrIx2rMj0kWUTz2khZye18JhyBFmfz/pw5eGL1oSQQofGFb7k6Ador1YIZuWSTuYlq/O9 zXCRU1a3qa2YKt78Db0yUWY3hrnQxt4= From: Jiri Denemark To: libvir-list@redhat.com Date: Tue, 5 Nov 2019 14:27:26 +0100 Message-Id: <619bbf239f24b5b31bb0d45dd3f86346699a3b48.1572958254.git.jdenemar@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v3 28/52] qemu: Drop virQEMUCapsGetHostCPUData 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.12 X-MC-Unique: vJ1x6NMGMEKd44QLUrn_Lg-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" It was very similar to virQEMUCapsGetAccel. Signed-off-by: Jiri Denemark Reviewed-by: J=C3=A1n Tomko --- Notes: Version 3: - new patch src/qemu/qemu_capabilities.c | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index e4188f7833..62667cb882 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -1952,24 +1952,14 @@ virQEMUCapsGetCPUModels(virQEMUCapsPtr qemuCaps, } =20 =20 -static virQEMUCapsHostCPUDataPtr -virQEMUCapsGetHostCPUData(virQEMUCapsPtr qemuCaps, - virDomainVirtType type) -{ - if (type =3D=3D VIR_DOMAIN_VIRT_KVM) - return &qemuCaps->kvm.hostCPU; - else - return &qemuCaps->tcg.hostCPU; -} - - virCPUDefPtr virQEMUCapsGetHostModel(virQEMUCapsPtr qemuCaps, virDomainVirtType type, virQEMUCapsHostCPUType cpuType) { - virQEMUCapsHostCPUDataPtr cpuData =3D virQEMUCapsGetHostCPUData(qemuCa= ps, type); + virQEMUCapsHostCPUDataPtr cpuData; =20 + cpuData =3D &virQEMUCapsGetAccel(qemuCaps, type)->hostCPU; switch (cpuType) { case VIR_QEMU_CAPS_HOST_CPU_REPORTED: return cpuData->reported; @@ -1994,8 +1984,9 @@ virQEMUCapsSetHostModel(virQEMUCapsPtr qemuCaps, virCPUDefPtr migratable, virCPUDefPtr full) { - virQEMUCapsHostCPUDataPtr cpuData =3D virQEMUCapsGetHostCPUData(qemuCa= ps, type); + virQEMUCapsHostCPUDataPtr cpuData; =20 + cpuData =3D &virQEMUCapsGetAccel(qemuCaps, type)->hostCPU; cpuData->reported =3D reported; cpuData->migratable =3D migratable; cpuData->full =3D full; @@ -3333,9 +3324,7 @@ qemuMonitorCPUModelInfoPtr virQEMUCapsGetCPUModelInfo(virQEMUCapsPtr qemuCaps, virDomainVirtType type) { - virQEMUCapsHostCPUDataPtr cpuData =3D virQEMUCapsGetHostCPUData(qemuCa= ps, type); - - return cpuData->info; + return virQEMUCapsGetAccel(qemuCaps, type)->hostCPU.info; } =20 =20 @@ -3344,9 +3333,7 @@ virQEMUCapsSetCPUModelInfo(virQEMUCapsPtr qemuCaps, virDomainVirtType type, qemuMonitorCPUModelInfoPtr modelInfo) { - virQEMUCapsHostCPUDataPtr cpuData =3D virQEMUCapsGetHostCPUData(qemuCa= ps, type); - - cpuData->info =3D modelInfo; + virQEMUCapsGetAccel(qemuCaps, type)->hostCPU.info =3D modelInfo; } =20 =20 --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list