From nobody Thu May 2 05:52:46 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=163.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1639135050702439.9673884798765; Fri, 10 Dec 2021 03:17:30 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-470--Uf8anulONK4t6EX3tEZXg-1; Fri, 10 Dec 2021 06:17:28 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E077B1934100; Fri, 10 Dec 2021 11:17:23 +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 5DBD15BE19; Fri, 10 Dec 2021 11:17:23 +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 DE9894CA93; Fri, 10 Dec 2021 11:17:22 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1BA3fUVZ008519 for ; Thu, 9 Dec 2021 22:41:31 -0500 Received: by smtp.corp.redhat.com (Postfix) id 653C9401DB1; Fri, 10 Dec 2021 03:41:30 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast09.extmail.prod.ext.rdu2.redhat.com [10.11.55.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 61A31401DBE for ; Fri, 10 Dec 2021 03:41:30 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 48D7E2B7604A for ; Fri, 10 Dec 2021 03:41:30 +0000 (UTC) Received: from mail-m975.mail.163.com (mail-m975.mail.163.com [123.126.97.5]) by relay.mimecast.com with ESMTP id us-mta-48-JnlDN7saN2uTlOUm71cqtg-1; Thu, 09 Dec 2021 22:41:28 -0500 Received: from localhost.localdomain (unknown [218.29.111.74]) by smtp5 (Coremail) with SMTP id HdxpCgBnd7vcyLJhJ2+mAw--.48511S2; Fri, 10 Dec 2021 11:26:21 +0800 (CST) X-MC-Unique: -Uf8anulONK4t6EX3tEZXg-1 X-MC-Unique: JnlDN7saN2uTlOUm71cqtg-1 From: JorhsonDeng To: libvir-list@redhat.com Subject: [PATCH] Fixes: #253 Date: Fri, 10 Dec 2021 11:26:18 +0800 Message-Id: <20211210032618.21561-1-jorhson_deng@163.com> MIME-Version: 1.0 X-CM-TRANSID: HdxpCgBnd7vcyLJhJ2+mAw--.48511S2 X-Coremail-Antispam: 1Uf129KBjvdXoW7XF1fCrWfWFWUCry5Gry5XFb_yoWDCwb_ua ySy39xXrW3tFn8u3Wj9F47ArWUWFZ5uF1rG3WDGrZYkw12yrn0qF98Xrs8Ww1UJFyIv3Wr Xr45Xwn5u3s8GjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IU86VbDUUUUU== X-Originating-IP: [218.29.111.74] X-CM-SenderInfo: xmrux2xrqbvvlqj6il2tof0z/xtbBXh1lVFaD9n9vUAAAsR X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 X-loop: libvir-list@redhat.com X-Mailman-Approved-At: Fri, 10 Dec 2021 06:17:21 -0500 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.15 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-ZM-MESSAGEID: 1639135051950100001 Content-Type: text/plain; charset="utf-8" To resolve the bug: #253. The restore method should call the qemuProcessRefreshState method to refreash the state of the devices. --- src/qemu/qemu_process.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 6b83a571b9..ebd60a7b84 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -7703,14 +7703,11 @@ qemuProcessStart(virConnectPtr conn, if (incoming->deferredURI && qemuMigrationDstRun(driver, vm, incoming->deferredURI, asyncJo= b) < 0) goto stop; - } else { - /* Refresh state of devices from QEMU. During migration this happe= ns - * in qemuMigrationDstFinish to ensure that state information is f= ully - * transferred. */ - if (qemuProcessRefreshState(driver, vm, asyncJob) < 0) - goto stop; } =20 + if (qemuProcessRefreshState(driver, vm, asyncJob) < 0) + goto stop; + if (qemuProcessFinishStartup(driver, vm, asyncJob, !(flags & VIR_QEMU_PROCESS_START_PAUSED), incoming ? --=20 2.27.0