From nobody Thu May 2 05:41:09 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 ARC-Seal: i=1; a=rsa-sha256; t=1568879809; cv=none; d=zoho.com; s=zohoarc; b=B9UuMHHa1PlhAxxGHkgEJLit7PRjKJT0MzISj/UKB9qcpoIqzdh8VnZz05Bupon4Aiy8PzRwjf1ujsgzSwJD+V/DzA58NEcxXHFDDcxgGMd1T9nmrGMG4mikLYJGlkVc57rsdl3TMYrDaTGMHDGi/BYa19lvxHMLWepAFAQ6JwQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568879809; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=fysHoMu9+9NeSzouF9cApjEfYXt+zGZXHzpsz2DvjzQ=; b=L7zlMTyFTd3bhmyD4AM2GoiDf+oEPZ/4NH5I8kYvAyb+ylFPui2EQxgKTj510cHGXx/OsCKpDEnn4IEglhsHAjbAoBso2TYPh0KNrU03bCo70ifHLmh8X3CIja8pnCzP0+Cj3hBZ2Xi9vhRW2L55dSEzdW583w5fs+75vEEC5a8= ARC-Authentication-Results: i=1; mx.zoho.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 1568879809326192.5695018972699; Thu, 19 Sep 2019 00:56:49 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 85DB9300DA2E; Thu, 19 Sep 2019 07:56:47 +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 649B25D9CD; Thu, 19 Sep 2019 07:56:47 +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 27CE518037C9; Thu, 19 Sep 2019 07:56:47 +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 x8J7ujvO032638 for ; Thu, 19 Sep 2019 03:56:45 -0400 Received: by smtp.corp.redhat.com (Postfix) id 65B0B6013A; Thu, 19 Sep 2019 07:56:45 +0000 (UTC) Received: from mx1.redhat.com (ext-mx14.extmail.prod.ext.phx2.redhat.com [10.5.110.43]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5E4C76012E for ; Thu, 19 Sep 2019 07:56:42 +0000 (UTC) Received: from huawei.com (szxga07-in.huawei.com [45.249.212.35]) (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 4B9F1308FC4D for ; Thu, 19 Sep 2019 07:56:42 +0000 (UTC) Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 1EB26259A744336AF5D5 for ; Thu, 19 Sep 2019 15:56:39 +0800 (CST) Received: from localhost (10.175.124.177) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.439.0; Thu, 19 Sep 2019 15:56:30 +0800 From: Xu Yandong To: Date: Thu, 19 Sep 2019 04:01:54 -0400 Message-ID: <1568880114-88172-1-git-send-email-xuyandong2@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.124.177] X-CFilter-Loop: Reflected X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 238 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Thu, 19 Sep 2019 07:56:42 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Thu, 19 Sep 2019 07:56:42 +0000 (UTC) for IP:'45.249.212.35' DOMAIN:'szxga07-in.huawei.com' HELO:'huawei.com' FROM:'xuyandong2@huawei.com' RCPT:'' X-RedHat-Spam-Score: -2.302 (RCVD_IN_DNSWL_MED, SPF_HELO_PASS, SPF_PASS) 45.249.212.35 szxga07-in.huawei.com 45.249.212.35 szxga07-in.huawei.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.43 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Cc: Xu Yandong , zhang.zhanghailiang@huawei.com Subject: [libvirt] [PATCH] qemu: clear vcpupin when unhotplug vcpu 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: , 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.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Thu, 19 Sep 2019 07:56:48 +0000 (UTC) Content-Type: text/plain; charset="utf-8" step1: hotplug vcpus step2: pin vcpus step3: unhotplug vcpus As a result, vcpu pin info still show up in xml. So we need clear it. Signed-off-by: Xu Yandong --- src/qemu/qemu_hotplug.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 62e505b779..df94b54d09 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -6105,6 +6105,9 @@ qemuDomainHotplugDelVcpu(virQEMUDriverPtr driver, =20 qemuDomainVcpuPersistOrder(vm->def); =20 + virBitmapFree(vcpuinfo->cpumask); + vcpuinfo->cpumask =3D NULL; + if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm, driver->cap= s) < 0) goto cleanup; =20 @@ -6390,6 +6393,8 @@ qemuDomainSetVcpusConfig(virDomainDefPtr def, =20 vcpu->online =3D false; vcpu->hotpluggable =3D VIR_TRISTATE_BOOL_YES; + virBitmapFree(vcpu->cpumask); + vcpu->cpumask =3D NULL; =20 if (--curvcpus =3D=3D nvcpus) break; --=20 2.18.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list