From nobody Thu May 9 01:22: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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1551146598539722.9691175605153; Mon, 25 Feb 2019 18:03:18 -0800 (PST) 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 A856E307D8BE; Tue, 26 Feb 2019 02:03:14 +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 BF4F560BF4; Tue, 26 Feb 2019 02:03:12 +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 231294A460; Tue, 26 Feb 2019 02:03:09 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x1Q2386K006580 for ; Mon, 25 Feb 2019 21:03:08 -0500 Received: by smtp.corp.redhat.com (Postfix) id 5C75B600C4; Tue, 26 Feb 2019 02:03:08 +0000 (UTC) Received: from mx1.redhat.com (ext-mx03.extmail.prod.ext.phx2.redhat.com [10.5.110.27]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5651C600C0 for ; Tue, 26 Feb 2019 02:03:06 +0000 (UTC) Received: from mxct.zte.com.cn (out1.zte.com.cn [202.103.147.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4A98A83F3B for ; Tue, 26 Feb 2019 02:03:03 +0000 (UTC) Received: from mse01.zte.com.cn (unknown [10.30.3.20]) by Forcepoint Email with ESMTPS id 195DC2E175A2EB69D954 for ; Tue, 26 Feb 2019 10:01:17 +0800 (CST) Received: from notes_smtp.zte.com.cn ([10.30.1.239]) by mse01.zte.com.cn with ESMTP id x1Q21E3Z031715 for ; Tue, 26 Feb 2019 10:01:14 +0800 (GMT-8) (envelope-from wang.yi59@zte.com.cn) Received: from fox-host8.localdomain ([10.74.120.8]) by szsmtp06.zte.com.cn (Lotus Domino Release 8.5.3FP6) with ESMTP id 2019022610012553-1762126 ; Tue, 26 Feb 2019 10:01:25 +0800 From: Yi Wang To: libvir-list@redhat.com Date: Tue, 26 Feb 2019 10:01:28 +0800 Message-Id: <1551146488-21308-1-git-send-email-wang.yi59@zte.com.cn> X-MIMETrack: Itemize by SMTP Server on SZSMTP06/server/zte_ltd(Release 8.5.3FP6|November 21, 2013) at 2019-02-26 10:01:25, Serialize by Router on notes_smtp/zte_ltd(Release 9.0.1FP7|August 17, 2016) at 2019-02-26 10:01:10, Serialize complete at 2019-02-26 10:01:10 X-MAIL: mse01.zte.com.cn x1Q21E3Z031715 X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 216 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 26 Feb 2019 02:03:04 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 26 Feb 2019 02:03:04 +0000 (UTC) for IP:'202.103.147.172' DOMAIN:'out1.zte.com.cn' HELO:'mxct.zte.com.cn' FROM:'wang.yi59@zte.com.cn' RCPT:'' X-RedHat-Spam-Score: -2.301 (RCVD_IN_DNSWL_MED, SPF_PASS) 202.103.147.172 out1.zte.com.cn 202.103.147.172 out1.zte.com.cn X-Scanned-By: MIMEDefang 2.78 on 10.5.110.27 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Cc: Yi Wang Subject: [libvirt] [PATCH v2] qemu: fix vcpupin fail as no vcpu tid set 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.48]); Tue, 26 Feb 2019 02:03:16 +0000 (UTC) Content-Type: text/plain; charset="utf-8" vcpupin will fail when maxvcpus is larger than current vcpu: virsh vcpupin win7 --vcpu 0 --cpulist 5-6 error: Requested operation is not valid: cpu affinity is not supported win7 xml in the command above is like below: ... 8 ... The reason is vcpu[3] and vcpu[4] have zero tids and should not been compared as valid situation in qemuDomainRefreshVcpuInfo(). This issue is introduced by commit 34f7743, which fix recording of vCPU pids for MTTCG. Signed-off-by: Yi Wang Reviewed-by: J=C3=A1n Tomko --- v2: stop considering zero TIDs as duplicate. Thanks to Jano. --- src/qemu/qemu_domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index ac01e86..c70d3f3 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -10708,7 +10708,7 @@ qemuDomainRefreshVcpuInfo(virQEMUDriverPtr driver, } =20 for (j =3D 0; j < i; j++) { - if (info[i].tid =3D=3D info[j].tid) { + if (0 !=3D info[i].tid && info[i].tid =3D=3D info[j].tid) { VIR_DEBUG("vCPU[%zu] PID %llu duplicates vCPU[%zu]", i, (unsigned long long)info[i].tid, j); validTIDs =3D false; --=20 1.8.3.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list