From nobody Fri Dec 19 20:17:17 2025 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; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1629816433; cv=none; d=zohomail.com; s=zohoarc; b=U5UlmzaSeP/HzQlg6Nd90i7i6a5WERkAcGy/4FTHwO7Dk+JWX6wKbdp4LNtCcEq4klyBW/VrJiKTUzxWNfU27qMq/S9YwZoq8R/lsSjS40aJUhetb05XfZrWhVhuZEtEp4GNYn5bQF2SqHpFINyoafXAxBp7UuJgxDkdnKKtilY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629816433; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=tNpwzKuVA3glusiviJjqYyUroqc/nxB7kXyOrfrhpU8=; b=BeBSgNrX8twkWMedNs4ewwKYFcV2DNYifE91p9nao9p3OmZgPUkZiouK93SstS7X2t/5bp9jPT8AvDITTlD+5XVuMcaidD33PSC7ZhHttIQQDIEaRUCPgrIliDoUeNQQ2m8z8AMdOxISjLyge91XU0kkAjRGLxdQU5WBGd7xG8o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) 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 1629816433735618.7676244508365; Tue, 24 Aug 2021 07:47:13 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-485-ANyrLtxUP3SQxX6eYG-3ng-1; Tue, 24 Aug 2021 10:45:46 -0400 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id F341D1008065; Tue, 24 Aug 2021 14:45:40 +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 C792360871; Tue, 24 Aug 2021 14:45:40 +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 8C6D5181A3F2; Tue, 24 Aug 2021 14:45:40 +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 17OEjc63005830 for ; Tue, 24 Aug 2021 10:45:39 -0400 Received: by smtp.corp.redhat.com (Postfix) id EFAB61ABDF; Tue, 24 Aug 2021 14:45:38 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 46B2118432 for ; Tue, 24 Aug 2021 14:45:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1629816432; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=tNpwzKuVA3glusiviJjqYyUroqc/nxB7kXyOrfrhpU8=; b=NYXg3qD0tlqHJZJRXUk3FgBjA6+UviDVaVtvErKIKZfrIOzjRxrBAL2KrVV5kKyYA4N4QT PiJm4xiwj6GjbGHWhXe9v5zRv75CrF0mjdjIPDC14zK3yW8jSGPuG0gZXWQFxL6AYpcSdO AGnf4KL6TUBSkIBQ6iELfMNQOoG3F1k= X-MC-Unique: ANyrLtxUP3SQxX6eYG-3ng-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 14/22] qemu: migration: Don't transfer 'allowReboot' flag Date: Tue, 24 Aug 2021 16:44:35 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com 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.13 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-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1629816434238100003 Content-Type: text/plain; charset="utf-8" The original idea was to ensure that the destination has the same original state of the '-no-reboot' flag to ensure identical behaviour of the 'vidDomainModifyLifecycleAction' API. With newer qemu's we'll be able to modify the behaviour using the monitor so old daemons won't be able to keep up anyways. Remove this feature as it's not very useful and will be replaced by a proper solution. Signed-off-by: Peter Krempa --- src/qemu/qemu_migration.c | 5 ----- src/qemu/qemu_migration_cookie.c | 22 ------------------- src/qemu/qemu_migration_cookie.h | 4 ---- .../basic-xml2xml-out.xml | 1 - .../full-xml2xml-out.xml | 1 - .../modern-dom-out-dest.xml | 1 - .../modern-dom-out-source.xml | 1 - .../nbd-bitmaps-xml2xml-out.xml | 1 - 8 files changed, 36 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index b441d0226c..dd226ea4bc 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -2415,8 +2415,6 @@ qemuMigrationSrcBeginPhase(virQEMUDriver *driver, if (priv->origCPU) cookieFlags |=3D QEMU_MIGRATION_COOKIE_CPU; - cookieFlags |=3D QEMU_MIGRATION_COOKIE_ALLOW_REBOOT; - if (!(flags & VIR_MIGRATE_OFFLINE)) cookieFlags |=3D QEMU_MIGRATION_COOKIE_CAPS; @@ -2876,7 +2874,6 @@ qemuMigrationDstPrepareAny(virQEMUDriver *driver, QEMU_MIGRATION_COOKIE_MEMORY_HOTP= LUG | QEMU_MIGRATION_COOKIE_CPU_HOTPLUG= | QEMU_MIGRATION_COOKIE_CPU | - QEMU_MIGRATION_COOKIE_ALLOW_REBOO= T | QEMU_MIGRATION_COOKIE_CAPS | QEMU_MIGRATION_COOKIE_BLOCK_DIRTY= _BITMAPS))) goto cleanup; @@ -2933,8 +2930,6 @@ qemuMigrationDstPrepareAny(virQEMUDriver *driver, goto stopjob; stopProcess =3D true; - priv->allowReboot =3D mig->allowReboot; - if (!(incoming =3D qemuMigrationDstPrepare(vm, tunnel, protocol, listenAddress, port, dataFD[0]))) diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_coo= kie.c index b67728f9c0..c7b010f0a0 100644 --- a/src/qemu/qemu_migration_cookie.c +++ b/src/qemu/qemu_migration_cookie.c @@ -558,18 +558,6 @@ qemuMigrationCookieAddCPU(qemuMigrationCookie *mig, } -static void -qemuMigrationCookieAddAllowReboot(qemuMigrationCookie *mig, - virDomainObj *vm) -{ - qemuDomainObjPrivate *priv =3D vm->privateData; - - mig->allowReboot =3D priv->allowReboot; - - mig->flags |=3D QEMU_MIGRATION_COOKIE_ALLOW_REBOOT; -} - - static int qemuMigrationCookieAddCaps(qemuMigrationCookie *mig, virDomainObj *vm, @@ -901,9 +889,6 @@ qemuMigrationCookieXMLFormat(virQEMUDriver *driver, if (mig->flags & QEMU_MIGRATION_COOKIE_CPU && mig->cpu) virCPUDefFormatBufFull(buf, mig->cpu, NULL); - if (mig->flags & QEMU_MIGRATION_COOKIE_ALLOW_REBOOT) - qemuDomainObjPrivateXMLFormatAllowReboot(buf, mig->allowReboot); - if (mig->flags & QEMU_MIGRATION_COOKIE_CAPS) qemuMigrationCookieCapsXMLFormat(buf, mig->caps); @@ -1407,10 +1392,6 @@ qemuMigrationCookieXMLParse(qemuMigrationCookie *mig, false) < 0) return -1; - if (flags & QEMU_MIGRATION_COOKIE_ALLOW_REBOOT && - qemuDomainObjPrivateXMLParseAllowReboot(ctxt, &mig->allowReboot) <= 0) - return -1; - if (flags & QEMU_MIGRATION_COOKIE_CAPS && !(mig->caps =3D qemuMigrationCookieCapsXMLParse(ctxt))) return -1; @@ -1491,9 +1472,6 @@ qemuMigrationCookieFormat(qemuMigrationCookie *mig, qemuMigrationCookieAddCPU(mig, dom) < 0) return -1; - if (flags & QEMU_MIGRATION_COOKIE_ALLOW_REBOOT) - qemuMigrationCookieAddAllowReboot(mig, dom); - if (flags & QEMU_MIGRATION_COOKIE_CAPS && qemuMigrationCookieAddCaps(mig, dom, party) < 0) return -1; diff --git a/src/qemu/qemu_migration_cookie.h b/src/qemu/qemu_migration_coo= kie.h index 6ac7b2084c..1726e5f2da 100644 --- a/src/qemu/qemu_migration_cookie.h +++ b/src/qemu/qemu_migration_cookie.h @@ -52,7 +52,6 @@ typedef enum { QEMU_MIGRATION_COOKIE_MEMORY_HOTPLUG =3D (1 << QEMU_MIGRATION_COOKIE_F= LAG_MEMORY_HOTPLUG), QEMU_MIGRATION_COOKIE_CPU_HOTPLUG =3D (1 << QEMU_MIGRATION_COOKIE_FLAG= _CPU_HOTPLUG), QEMU_MIGRATION_COOKIE_CPU =3D (1 << QEMU_MIGRATION_COOKIE_FLAG_CPU), - QEMU_MIGRATION_COOKIE_ALLOW_REBOOT =3D (1 << QEMU_MIGRATION_COOKIE_FLA= G_ALLOW_REBOOT), QEMU_MIGRATION_COOKIE_CAPS =3D (1 << QEMU_MIGRATION_COOKIE_FLAG_CAPS), QEMU_MIGRATION_COOKIE_BLOCK_DIRTY_BITMAPS =3D (1 << QEMU_MIGRATION_COO= KIE_FLAG_BLOCK_DIRTY_BITMAPS), } qemuMigrationCookieFeatures; @@ -168,9 +167,6 @@ struct _qemuMigrationCookie { /* If flags & QEMU_MIGRATION_COOKIE_CPU */ virCPUDef *cpu; - /* If flags & QEMU_MIGRATION_COOKIE_ALLOW_REBOOT */ - virTristateBool allowReboot; - /* If flags & QEMU_MIGRATION_COOKIE_CAPS */ qemuMigrationCookieCaps *caps; diff --git a/tests/qemumigrationcookiexmldata/basic-xml2xml-out.xml b/tests= /qemumigrationcookiexmldata/basic-xml2xml-out.xml index 42b351047e..e05f3c3a83 100644 --- a/tests/qemumigrationcookiexmldata/basic-xml2xml-out.xml +++ b/tests/qemumigrationcookiexmldata/basic-xml2xml-out.xml @@ -3,7 +3,6 @@ dcf47dbd-46d1-4d5b-b442-262a806a333a hostname 4a802f00-4cba-5df6-9679-a08c4c5b577f - diff --git a/tests/qemumigrationcookiexmldata/full-xml2xml-out.xml b/tests/= qemumigrationcookiexmldata/full-xml2xml-out.xml index a07dd1f147..61fcaff13f 100644 --- a/tests/qemumigrationcookiexmldata/full-xml2xml-out.xml +++ b/tests/qemumigrationcookiexmldata/full-xml2xml-out.xml @@ -211,7 +211,6 @@ 14 - diff --git a/tests/qemumigrationcookiexmldata/modern-dom-out-dest.xml b/tes= ts/qemumigrationcookiexmldata/modern-dom-out-dest.xml index ba84c65a3d..246efc06aa 100644 --- a/tests/qemumigrationcookiexmldata/modern-dom-out-dest.xml +++ b/tests/qemumigrationcookiexmldata/modern-dom-out-dest.xml @@ -6,7 +6,6 @@ - diff --git a/tests/qemumigrationcookiexmldata/modern-dom-out-source.xml b/t= ests/qemumigrationcookiexmldata/modern-dom-out-source.xml index ba84c65a3d..246efc06aa 100644 --- a/tests/qemumigrationcookiexmldata/modern-dom-out-source.xml +++ b/tests/qemumigrationcookiexmldata/modern-dom-out-source.xml @@ -6,7 +6,6 @@ - diff --git a/tests/qemumigrationcookiexmldata/nbd-bitmaps-xml2xml-out.xml b= /tests/qemumigrationcookiexmldata/nbd-bitmaps-xml2xml-out.xml index 09b6fa291c..2bd6de42be 100644 --- a/tests/qemumigrationcookiexmldata/nbd-bitmaps-xml2xml-out.xml +++ b/tests/qemumigrationcookiexmldata/nbd-bitmaps-xml2xml-out.xml @@ -29,7 +29,6 @@ - --=20 2.31.1