From nobody Sun Feb 8 18:10:46 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.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 (zohomail.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=1596812383; cv=none; d=zohomail.com; s=zohoarc; b=RAJSB+WSHD14pH42dHOJg+EGoxtcbQ8+Te2CEuLR3hm0sHw64EK1ny8Pn9sdezZZpYwz/0/avdVS/5qi1TwTiEyxEfxAJncPwFWKOXYZq2R0dexk83oBeq9e1Y8/cgzJQiCPPiCcXbzLYxFcAMagozPo/fdj/x6hplXHfw9NuMY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1596812383; 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=IFnwj10t1Hmf+mquzHOimRBrXK1VNz8fX5xvLxH9HJ8=; b=l1nN57vgwfHZBNHzzGBecUErW8Rvi32nN7weqzDuh3jDWGgn836GXJ7Qwrbyxlrrjp4Sr5s9p1JwYBT4YXkq/jiIdYcDEdxSCcdgZOkf4Qt+Lxpxea8AJi5gz1w7gCUjMdQZEnOVnHeMKZtaEHZZ72dzfr9TE+aQeWqj2/Lw9OQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.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-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1596812383447844.4663701828449; Fri, 7 Aug 2020 07:59:43 -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-89-JwVidNVNP9Ofhx1agfO8lA-1; Fri, 07 Aug 2020 10:59:39 -0400 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 73D8E19200C8; Fri, 7 Aug 2020 14:59:34 +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 4FA9360CD0; Fri, 7 Aug 2020 14:59:34 +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 19E5FA552E; Fri, 7 Aug 2020 14:59:34 +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 077ExLmH022569 for ; Fri, 7 Aug 2020 10:59:21 -0400 Received: by smtp.corp.redhat.com (Postfix) id E869565C9B; Fri, 7 Aug 2020 14:59:21 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.40.192.28]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6187E65C99 for ; Fri, 7 Aug 2020 14:59:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596812382; 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=IFnwj10t1Hmf+mquzHOimRBrXK1VNz8fX5xvLxH9HJ8=; b=Lap7Ko1NmQLgvxqiO5H6kG4pyJTQxIYoBy4UdS+FEczxaCAg7IdFzMGRTvgQ5JbHdMgecS lN13ON1/eA84GD+UtR296RO6R9Z6HXQDg+FixuSzbc1As82p8GyBnZIe64QiNs0j+XtGro xE33is4IgSRuDEtO5jP3QiFr4GtAsos= X-MC-Unique: JwVidNVNP9Ofhx1agfO8lA-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 3/3] qemu: consider available CPUs in iothread info output Date: Fri, 7 Aug 2020 16:59:14 +0200 Message-Id: <60e68fff065566aee24dd85da01298e97af926a8.1596812211.git.phrdina@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 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 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) Content-Type: text/plain; charset="utf-8" Following the rationale from commit <2020c6af8a8e4bb04acb629d089142be984484c8> we should do the same thing for iothread info as well. Signed-off-by: Pavel Hrdina Reviewed-by: Daniel P. Berrang=C3=A9 --- src/qemu/qemu_driver.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 9eaea8d613..07e9518a9b 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -5693,16 +5693,12 @@ qemuDomainGetIOThreadsConfig(virDomainDefPtr target= Def, virDomainIOThreadInfoPtr *info_ret =3D NULL; virBitmapPtr bitmap =3D NULL; virBitmapPtr cpumask =3D NULL; - int hostcpus; size_t i; int ret =3D -1; =20 if (targetDef->niothreadids =3D=3D 0) return 0; =20 - if ((hostcpus =3D virHostCPUGetCount()) < 0) - goto cleanup; - if (VIR_ALLOC_N(info_ret, targetDef->niothreadids) < 0) goto cleanup; =20 @@ -5718,9 +5714,8 @@ qemuDomainGetIOThreadsConfig(virDomainDefPtr targetDe= f, if (targetDef->cpumask) { cpumask =3D targetDef->cpumask; } else { - if (!(bitmap =3D virBitmapNew(hostcpus))) + if (!(bitmap =3D virHostCPUGetAvailableCPUsBitmap())) goto cleanup; - virBitmapSetAll(bitmap); cpumask =3D bitmap; } } --=20 2.26.2