From nobody Thu May 2 22:55:33 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 1500798421504450.7323032099591; Sun, 23 Jul 2017 01:27:01 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id A9A797F7A2; Sun, 23 Jul 2017 08:26:59 +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 8021618EE8; Sun, 23 Jul 2017 08:26:59 +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 224BB180BA86; Sun, 23 Jul 2017 08:26:59 +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 v6M9SJ20014391 for ; Sat, 22 Jul 2017 05:28:20 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9159D84779; Sat, 22 Jul 2017 09:28:19 +0000 (UTC) Received: from mx1.redhat.com (ext-mx06.extmail.prod.ext.phx2.redhat.com [10.5.110.30]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7C28A7D676 for ; Sat, 22 Jul 2017 09:28:17 +0000 (UTC) Received: from out1.zte.com.cn (out1.zte.com.cn [202.103.147.172]) by mx1.redhat.com (Postfix) with ESMTP id A82173680B for ; Sat, 22 Jul 2017 09:28:13 +0000 (UTC) Received: from unknown (HELO mse01.zte.com.cn) (10.30.3.20) by localhost with (AES256-SHA encrypted) SMTP; 22 Jul 2017 09:27:06 -0000 Received: from notes_smtp.zte.com.cn ([10.30.1.239]) by mse01.zte.com.cn with ESMTP id v6M9S7Gh085487 for ; Sat, 22 Jul 2017 17:28:07 +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 2017072217281485-4544170 ; Sat, 22 Jul 2017 17:28:14 +0800 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com A9A797F7A2 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=zte.com.cn Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com A9A797F7A2 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com A82173680B Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=zte.com.cn Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=wang.yi59@zte.com.cn DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com A82173680B X-scanvirus: By SEG_CYREN AntiVirus Engine X-scanresult: CLEAN X-MAILFROM: X-RCPTTO: X-FROMIP: 10.30.3.20 X-SEG-Scaned: 1 X-Received: unknown,10.30.3.20,20170722172706 From: Yi Wang To: libvir-list@redhat.com Date: Sat, 22 Jul 2017 05:45:59 -0400 Message-Id: <1500716759-47351-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 2017-07-22 17:28:14, Serialize by Router on notes_smtp/zte_ltd(Release 8.5.3FP6|November 21, 2013) at 2017-07-22 17:27:47, Serialize complete at 2017-07-22 17:27:47 X-MAIL: mse01.zte.com.cn v6M9S7Gh085487 X-HQIP: 127.0.0.1 X-Greylist: Delayed for 52:46:05 by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Sat, 22 Jul 2017 09:28:16 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Sat, 22 Jul 2017 09:28:16 +0000 (UTC) for IP:'202.103.147.172' DOMAIN:'out1.zte.com.cn' HELO:'out1.zte.com.cn' FROM:'wang.yi59@zte.com.cn' RCPT:'' X-RedHat-Spam-Score: -0.002 (RP_MATCHES_RCVD, 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.30 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: wang.yi59@zte.com.cn, Liu.Jianjun3@zte.com.cn, Xi Xu Subject: [libvirt] [PATCH] qemu: fix migration fail of an auto-placement vm after attached memory to it 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.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Sun, 23 Jul 2017 08:27:00 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" This patch fix this condition: -vm has the "auto" placement in vcpu -hot-plug memory with source node "1-3" through attach-device command -migrate the vm to a host with only 2 numa node And the migration will fail with error: "error: unsupported configuration: NUMA node 2 is unavailable" Signed-off-by: Yi Wang Signed-off-by: Xi Xu --- src/qemu/qemu_process.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 7b708be..dcc564c 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -5259,6 +5259,16 @@ qemuProcessPrepareDomain(virConnectPtr conn, goto cleanup; } =20 + VIR_DEBUG("Updating memory source nodes"); + for (i =3D 0; i < vm->def->nmems; i++) { + virDomainMemoryDefPtr mem =3D vm->def->mems[i]; + if (priv->autoNodeset && mem && mem->sourceNodes) { + virBitmapFree(mem->sourceNodes); + if (!(mem->sourceNodes =3D virBitmapNewCopy(priv->autoNodeset)= )) + goto cleanup; + } + } + /* Whether we should use virtlogd as stdio handler for character * devices source backend. */ if (cfg->stdioLogD && --=20 1.8.3.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list