From nobody Mon Sep 8 22:02:02 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1737629579456237.11844597490028; Thu, 23 Jan 2025 02:52:59 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id D52D9149D; Thu, 23 Jan 2025 05:52:58 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 2A42713D6; Thu, 23 Jan 2025 05:52:28 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id E7B1913C7; Thu, 23 Jan 2025 05:52:23 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 4A77013A5 for ; Thu, 23 Jan 2025 05:52:23 -0500 (EST) Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-542-VkC9gkmZMHWXOvJlNd7sBg-1; Thu, 23 Jan 2025 05:52:21 -0500 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D44961955F2D for ; Thu, 23 Jan 2025 10:52:20 +0000 (UTC) Received: from orkuz (unknown [10.43.3.115]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 606F5195608A for ; Thu, 23 Jan 2025 10:52:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1737629543; h=from:from: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; bh=21pzlY6zKjZXsWZbG309UnsyZRuqRqt1GBw0bJP2nEI=; b=gAeLxXDzV+fhP2qc3+jjPqh6nluUWKGfsCd9O93tYoJg48K32EREtzQFA/cwOPkPIMKGd4 KVsF13hW/8qBbxm4J4qQUHGQjrWpilf1E4m3/uzEbITEwB9qM3Bcn13QYeCAoyFnOA6PF9 XTzocUCAo+OLxtxq18nCn0Do1T+XoM4= X-MC-Unique: VkC9gkmZMHWXOvJlNd7sBg-1 X-Mimecast-MFC-AGG-ID: VkC9gkmZMHWXOvJlNd7sBg From: Jiri Denemark To: devel@lists.libvirt.org Subject: [PATCH v2 1/3] Add a migration parameter for available bandwidth in switchover Date: Thu, 23 Jan 2025 11:52:14 +0100 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: mF5Se67VUO-2Oipq166H3NRt1kLfpiSpL-ILYrQYIbc_1737629541 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: JVBST5XATYA33VIEF57FZ5DHYPSRJPJ7 X-Message-ID-Hash: JVBST5XATYA33VIEF57FZ5DHYPSRJPJ7 X-MailFrom: jdenemar@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1737629581031019000 Content-Type: text/plain; charset="utf-8" The new VIR_MIGRATE_PARAM_BANDWIDTH_AVAIL_SWITCHOVER parameter can be used to override the estimated bandwidth that can be used for transferring guest memory and device state once virtual CPUs are stopped. Signed-off-by: Jiri Denemark Reviewed-by: Michal Privoznik --- include/libvirt/libvirt-domain.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-dom= ain.h index 2a4b81f4df..74016c6c46 100644 --- a/include/libvirt/libvirt-domain.h +++ b/include/libvirt/libvirt-domain.h @@ -1206,6 +1206,24 @@ typedef enum { */ # define VIR_MIGRATE_PARAM_BANDWIDTH_POSTCOPY "bandwidth.postcopy" =20 +/** + * VIR_MIGRATE_PARAM_BANDWIDTH_AVAIL_SWITCHOVER: + * + * virDomainMigrate* params field: the bandwidth (in MiB/s) available for = the + * final phase of (pre-copy) migration during which CPUs are stopped and a= ll + * the remaining memory and device state is transferred. Knowing this band= width + * is important for accurate estimation of the domain downtime and deciding + * the right moment for switching over. Normally this would be estimated b= ased + * on the bandwidth used by migration, but this could be lower than the ac= tual + * available bandwidth. Using this parameter to override the computed valu= e may + * help with migration convergence when the migration would keep iterating= over + * and over thinking there's not enough bandwidth to comply with the confi= gured + * maximum downtime. + * + * Since: 11.1.0 + */ +# define VIR_MIGRATE_PARAM_BANDWIDTH_AVAIL_SWITCHOVER "bandwidth.avail.swi= tchover" + /** * VIR_MIGRATE_PARAM_GRAPHICS_URI: * --=20 2.48.1 From nobody Mon Sep 8 22:02:02 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1737629604411356.61782064183853; Thu, 23 Jan 2025 02:53:24 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 845651493; Thu, 23 Jan 2025 05:53:23 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 30109144A; Thu, 23 Jan 2025 05:52:39 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 5004213F2; Thu, 23 Jan 2025 05:52:33 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 5746514AF for ; Thu, 23 Jan 2025 05:52:25 -0500 (EST) Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-277-aZyPC0K_NKyUt9_iMFn83Q-1; Thu, 23 Jan 2025 05:52:23 -0500 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id DC8C1195608D for ; Thu, 23 Jan 2025 10:52:22 +0000 (UTC) Received: from orkuz (unknown [10.43.3.115]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 68DAD1955F1B for ; Thu, 23 Jan 2025 10:52:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1737629545; h=from:from: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; bh=nqIdfGTJK3aS+uhu/8x0vxue+uWeeBRP6QXPFDWtsAc=; b=J0amog0ZJ/JHzSx9qvzhujMsLx3H+1ZP3ithgNMo51LnmAusN5jLYG6TwDyWPOSt8ltIvt b6kFiqgekOriHy8Etjymch8ISWh2BGNwBnwRf0YWMfqjGn/x8946BJe0x8T8qeI5D/yqm8 +x6hoZtdBS3L8O1el3D/0fy6yjYtyQE= X-MC-Unique: aZyPC0K_NKyUt9_iMFn83Q-1 X-Mimecast-MFC-AGG-ID: aZyPC0K_NKyUt9_iMFn83Q From: Jiri Denemark To: devel@lists.libvirt.org Subject: [PATCH v2 2/3] virsh migrate: Add --available-switchover-bandwidth option Date: Thu, 23 Jan 2025 11:52:15 +0100 Message-ID: <4f0f13d20ad23690ed36a3d693802245746a8cfa.1737629504.git.jdenemar@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: _t6oNFBOE2yUdAOTjgO9UsZjxVt2BOES4eX6F32U3YY_1737629543 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 6FBDPVFIDWWTNWJ6Q4HQ5YNQ347MGLCE X-Message-ID-Hash: 6FBDPVFIDWWTNWJ6Q4HQ5YNQ347MGLCE X-MailFrom: jdenemar@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1737629605169019000 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark Reviewed-by: Michal Privoznik --- docs/manpages/virsh.rst | 12 ++++++++++++ tools/virsh-domain.c | 13 +++++++++++++ 2 files changed, 25 insertions(+) diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst index e801037c04..bf0436621b 100644 --- a/docs/manpages/virsh.rst +++ b/docs/manpages/virsh.rst @@ -3407,6 +3407,7 @@ migrate [--parallel [--parallel-connections connections]] [--bandwidth bandwidth] [--tls-destination hostname] [--disks-uri URI] [--copy-storage-synchronous-writes] + [--available-switchover-bandwidth bandwidth] =20 Migrate domain to another host. Add *--live* for live migration; <--p2p> for peer-2-peer migration; *--direct* for direct migration; or *--tunnelle= d* @@ -3663,6 +3664,17 @@ the context of the existing socket because it is dif= ferent from the file representation of the socket and the context is chosen by its creator (usu= ally by using *setsockcreatecon{,_raw}()* functions). =20 +Optional *--available-switchover-bandwidth* overrides the automatically +computed bandwidth (in MiB/s) available for the final phase of (pre-copy) +migration during which CPUs are stopped and all the remaining memory and d= evice +state is transferred. Knowing this bandwidth is important for accurate +estimation of the domain downtime and deciding the right moment for switch= ing +over. Normally this would be estimated based on the bandwidth used by +migration, but this could be lower than the actual available bandwidth. Us= ing +this option may help with migration convergence when the migration would k= eep +iterating over and over thinking there's not enough bandwidth to comply wi= th +the configured maximum downtime. + =20 migrate-compcache ----------------- diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 546db955a9..f3da2f903f 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -10788,6 +10788,10 @@ static const vshCmdOptDef opts_migrate[] =3D { .type =3D VSH_OT_INT, .help =3D N_("compress level for zstd compression") }, + {.name =3D "available-switchover-bandwidth", + .type =3D VSH_OT_INT, + .help =3D N_("bandwidth (in MiB/s) available for the final phase of m= igration") + }, {.name =3D NULL} }; =20 @@ -11102,6 +11106,15 @@ doMigrate(void *opaque) VIR_MIGRATE_PARAM_TLS_DESTINATION, opt) < = 0) goto save_error; =20 + if ((rv =3D vshCommandOptULongLong(ctl, cmd, "available-switchover-ban= dwidth", &ullOpt)) < 0) { + goto out; + } else if (rv > 0) { + if (virTypedParamsAddULLong(¶ms, &nparams, &maxparams, + VIR_MIGRATE_PARAM_BANDWIDTH_AVAIL_SWIT= CHOVER, + ullOpt) < 0) + goto save_error; + } + if (flags & VIR_MIGRATE_PEER2PEER || vshCommandOptBool(cmd, "direct"))= { if (virDomainMigrateToURI3(dom, desturi, params, nparams, flags) = =3D=3D 0) data->ret =3D 0; --=20 2.48.1 From nobody Mon Sep 8 22:02:02 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 173762962124588.82337949120245; Thu, 23 Jan 2025 02:53:41 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 90B9E13C7; Thu, 23 Jan 2025 05:53:40 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id E6C3A1481; Thu, 23 Jan 2025 05:52:39 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 04CED14A8; Thu, 23 Jan 2025 05:52:35 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 3156B1423 for ; Thu, 23 Jan 2025 05:52:27 -0500 (EST) Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-660-UC7vnMydNs2MbDBTTCR1yQ-1; Thu, 23 Jan 2025 05:52:25 -0500 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B8D6F195608F for ; Thu, 23 Jan 2025 10:52:24 +0000 (UTC) Received: from orkuz (unknown [10.43.3.115]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 4212C195608E for ; Thu, 23 Jan 2025 10:52:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1737629546; h=from:from: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; bh=9kTJdC73ziK6qsOPQJwBNnrUaGawwUQYaDSLbeDSAnM=; b=i+OukLV1lZmQREbALk6i+KUiTRqMa9yDx2HRgKgDfsrBOwL+X0ELYdsKK0hOyYORMX7Gc4 4B617eVu1xeFyixhHHgC2UU2ZD16W0x/LSi1Wvd0ZBOHsN2pK/mVLzpPgKtkYgIbUHAGSD l8TPdHQ6nCdBoQr6pUC1BjhyK3sqdX8= X-MC-Unique: UC7vnMydNs2MbDBTTCR1yQ-1 X-Mimecast-MFC-AGG-ID: UC7vnMydNs2MbDBTTCR1yQ From: Jiri Denemark To: devel@lists.libvirt.org Subject: [PATCH v2 3/3] qemu: Add support for avail-switchover-bandwidth migration parameter Date: Thu, 23 Jan 2025 11:52:16 +0100 Message-ID: <31afbe8a4a2753f507edba4b61836e20a6c8dc3a.1737629504.git.jdenemar@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: kPq88NEp-kYORxHBdQSo_0K1Mhxa0-z9IAp4kbU_jvM_1737629544 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 34A34UE5V3RQYTI3FGHJJMDD5TNJQPKA X-Message-ID-Hash: 34A34UE5V3RQYTI3FGHJJMDD5TNJQPKA X-MailFrom: jdenemar@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1737629623851019000 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark Reviewed-by: Michal Privoznik --- src/qemu/qemu_migration.h | 1 + src/qemu/qemu_migration_params.c | 9 +++++++++ src/qemu/qemu_migration_params.h | 1 + 3 files changed, 11 insertions(+) diff --git a/src/qemu/qemu_migration.h b/src/qemu/qemu_migration.h index 4b7ef9688a..efe1b9e88a 100644 --- a/src/qemu/qemu_migration.h +++ b/src/qemu/qemu_migration.h @@ -92,6 +92,7 @@ VIR_MIGRATE_PARAM_COMPRESSION_ZSTD_LEVEL, VIR_TYPED_PARAM_INT, \ VIR_MIGRATE_PARAM_TLS_DESTINATION, VIR_TYPED_PARAM_STRING, \ VIR_MIGRATE_PARAM_DISKS_URI, VIR_TYPED_PARAM_STRING, \ + VIR_MIGRATE_PARAM_BANDWIDTH_AVAIL_SWITCHOVER, VIR_TYPED_PARAM_ULLONG, \ NULL =20 =20 diff --git a/src/qemu/qemu_migration_params.c b/src/qemu/qemu_migration_par= ams.c index 98822012cc..c10660d6f2 100644 --- a/src/qemu/qemu_migration_params.c +++ b/src/qemu/qemu_migration_params.c @@ -128,6 +128,7 @@ VIR_ENUM_IMPL(qemuMigrationParam, "multifd-compression", "multifd-zlib-level", "multifd-zstd-level", + "avail-switchover-bandwidth", ); =20 typedef struct _qemuMigrationParamsAlwaysOnItem qemuMigrationParamsAlwaysO= nItem; @@ -266,6 +267,11 @@ static const qemuMigrationParamsTPMapItem qemuMigratio= nParamsTPMap[] =3D { {.typedParam =3D VIR_MIGRATE_PARAM_TLS_DESTINATION, .param =3D QEMU_MIGRATION_PARAM_TLS_HOSTNAME, .party =3D QEMU_MIGRATION_SOURCE}, + + {.typedParam =3D VIR_MIGRATE_PARAM_BANDWIDTH_AVAIL_SWITCHOVER, + .unit =3D 1024 * 1024, /* MiB/s */ + .param =3D QEMU_MIGRATION_PARAM_AVAIL_SWITCHOVER_BANDWIDTH, + .party =3D QEMU_MIGRATION_SOURCE}, }; =20 static const qemuMigrationParamInfoItem qemuMigrationParamInfo[] =3D { @@ -318,6 +324,9 @@ static const qemuMigrationParamInfoItem qemuMigrationPa= ramInfo[] =3D { [QEMU_MIGRATION_PARAM_MULTIFD_ZSTD_LEVEL] =3D { .type =3D QEMU_MIGRATION_PARAM_TYPE_INT, }, + [QEMU_MIGRATION_PARAM_AVAIL_SWITCHOVER_BANDWIDTH] =3D { + .type =3D QEMU_MIGRATION_PARAM_TYPE_ULL, + }, }; G_STATIC_ASSERT(G_N_ELEMENTS(qemuMigrationParamInfo) =3D=3D QEMU_MIGRATION= _PARAM_LAST); =20 diff --git a/src/qemu/qemu_migration_params.h b/src/qemu/qemu_migration_par= ams.h index df67f1fb92..17fc63f527 100644 --- a/src/qemu/qemu_migration_params.h +++ b/src/qemu/qemu_migration_params.h @@ -64,6 +64,7 @@ typedef enum { QEMU_MIGRATION_PARAM_MULTIFD_COMPRESSION, QEMU_MIGRATION_PARAM_MULTIFD_ZLIB_LEVEL, QEMU_MIGRATION_PARAM_MULTIFD_ZSTD_LEVEL, + QEMU_MIGRATION_PARAM_AVAIL_SWITCHOVER_BANDWIDTH, =20 QEMU_MIGRATION_PARAM_LAST } qemuMigrationParam; --=20 2.48.1