From nobody Sun Feb 8 12:33:07 2026 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.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 1491397811455889.6031758105777; Wed, 5 Apr 2017 06:10:11 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 02295C05974A; Wed, 5 Apr 2017 13:10:10 +0000 (UTC) Received: from colo-mx.corp.redhat.com (unknown [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BDCBD84547; Wed, 5 Apr 2017 13:10:09 +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 65F195ED64; Wed, 5 Apr 2017 13:10:09 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v35DA7vY028770 for ; Wed, 5 Apr 2017 09:10:07 -0400 Received: by smtp.corp.redhat.com (Postfix) id C6758A4063; Wed, 5 Apr 2017 13:10:07 +0000 (UTC) Received: from virval.usersys.redhat.com (dhcp129-92.brq.redhat.com [10.34.129.92]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 993ECA406F for ; Wed, 5 Apr 2017 13:10:05 +0000 (UTC) Received: by virval.usersys.redhat.com (Postfix, from userid 500) id 9D288101C9D; Wed, 5 Apr 2017 15:10:04 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 02295C05974A Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.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 02295C05974A From: Jiri Denemark To: libvir-list@redhat.com Date: Wed, 5 Apr 2017 15:09:59 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: Mail-Followup-To: libvir-list@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 4/8] qemu: Don't reset TLS in qemuMigrationRun 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Wed, 05 Apr 2017 13:10:10 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Finished qemuMigrationRun does not mean the migration itself finished (it might have just switched to post-copy mode). While resetting TLS parameters is probably OK at this point even if migration is still running, we want to consolidate the code which resets various migration parameters. Thus qemuMigrationResetTLS will be called from the Confirm phase (or at the end of the Perform phase in case of v2 protocol), when migration is either canceled or finished. Signed-off-by: Jiri Denemark --- src/qemu/qemu_migration.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 68e72b37f..87506c73a 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -3216,6 +3216,9 @@ qemuMigrationConfirmPhase(virQEMUDriverPtr driver, qemuDomainEventQueue(driver, event); } =20 + qemuMigrationResetTLS(driver, vm, QEMU_ASYNC_JOB_MIGRATION_OUT, + NULL, NULL); + if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm, driver-= >caps) < 0) VIR_WARN("Failed to save status on vm %s", vm->def->name); } @@ -3848,10 +3851,6 @@ qemuMigrationRun(virQEMUDriverPtr driver, ret =3D -1; } =20 - if (qemuMigrationResetTLS(driver, vm, QEMU_ASYNC_JOB_MIGRATION_OUT, - tlsAlias, secAlias) < 0) - ret =3D -1; - VIR_FREE(tlsAlias); VIR_FREE(secAlias); virObjectUnref(cfg); @@ -4827,6 +4826,13 @@ qemuMigrationPerformJob(virQEMUDriverPtr driver, if (ret < 0) orig_err =3D virSaveLastError(); =20 + /* v2 proto has no confirm phase so we need to reset migration paramet= ers + * here + */ + if (!v3proto && ret < 0) + qemuMigrationResetTLS(driver, vm, QEMU_ASYNC_JOB_MIGRATION_OUT, + NULL, NULL); + if (qemuMigrationRestoreDomainState(conn, vm)) { event =3D virDomainEventLifecycleNewFromObj(vm, VIR_DOMAIN_EVENT_RESUMED, --=20 2.12.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list