From nobody Sun Apr 28 23:35:26 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 1545189444869249.84854536542673; Tue, 18 Dec 2018 19:17:24 -0800 (PST) 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 8CCAAC0587FE; Wed, 19 Dec 2018 03:17:18 +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 AF8551712E; Wed, 19 Dec 2018 03:17:16 +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 E5D27181B9E9; Wed, 19 Dec 2018 03:17:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id wBJ3HA03004358 for ; Tue, 18 Dec 2018 22:17:10 -0500 Received: by smtp.corp.redhat.com (Postfix) id ABD2A1019633; Wed, 19 Dec 2018 03:17:10 +0000 (UTC) Received: from lhuang.nay.redhat.com (unknown [10.66.6.19]) by smtp.corp.redhat.com (Postfix) with ESMTP id 96927100034B; Wed, 19 Dec 2018 03:17:04 +0000 (UTC) From: Luyao Huang To: libvir-list@redhat.com Date: Wed, 19 Dec 2018 11:17:01 +0800 Message-Id: <1545189421-631-1-git-send-email-lhuang@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Luyao Huang Subject: [libvirt] [PATCH] virsh: Fix vcpupin command output wrong vcpu pinning info 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.32]); Wed, 19 Dec 2018 03:17:22 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Commit 3072ded3 changed the waya to format the vcpu pinning info and forget to get cpumap for each vcpu during the loop, that cause vcpupin command will display vcpu 0 info for other vcpus. Signed-off-by: Luyao Huang --- tools/virsh-domain.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 4d9f065..24f7852 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -6954,7 +6954,8 @@ virshVcpuPinQuery(vshControl *ctl, if (got_vcpu && i !=3D vcpu) continue; =20 - if (!(pinInfo =3D virBitmapDataFormat(cpumap, cpumaplen))) + if (!(pinInfo =3D virBitmapDataFormat(VIR_GET_CPUMAP(cpumap, c= pumaplen, i), + cpumaplen))) goto cleanup; =20 if (virAsprintf(&vcpuStr, "%zu", i) < 0) --=20 1.8.3.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list