From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202502 header.b=KbSNAaw2; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 13BC35A0274 for ; Mon, 10 Feb 2025 03:59:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202502; t=1739156354; bh=68Rcvmce7vvRixtJpbVJkmuJGMfMwJE4Ndx9davh+9Q=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KbSNAaw20lfM3maLy+mQKrTH/A/j5avF7L9BtZ8EAwZwoGPTRCEjOV/jCwRS1P2Jc BudJtF2m0JOF6EPNSSshJ0riaLeaAtySf35zw+T5CLrl3Tul52rfym8gyLvmNcbeBD zxiRAmLF9lCx+kXmgSEQFFTSTiR0gwXgmAGfXvS1mc912kPvIeB0GrrXmH7Sn1Osi4 J653eqauXJBoIrbstkHfAUHZVMJc1lWdEZFmZ6ertZ1pfhBK8S2N2iGWDC7hv/im4i O2/Nrz6D9Bj1tLZBK5F6af2MqoVH0ZLrD+v15S3svrRyW6qyvOSq2nfZI3VqOfqL6N GL09ugNw2u7UQ== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4Yrq6V6r6pz4wcy; Mon, 10 Feb 2025 13:59:14 +1100 (AEDT) Date: Mon, 10 Feb 2025 13:26:02 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH v13 1/6] migrate: Skeleton of live migration logic Message-ID: References: <20250209222005.1640077-1-sbrivio@redhat.com> <20250209222005.1640077-2-sbrivio@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="4zcTiZWNUucruYW/" Content-Disposition: inline In-Reply-To: <20250209222005.1640077-2-sbrivio@redhat.com> Message-ID-Hash: B7UWGTORBZ3CKMXHSIAGCBNQ7E7E5UKX X-Message-ID-Hash: B7UWGTORBZ3CKMXHSIAGCBNQ7E7E5UKX X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --4zcTiZWNUucruYW/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Feb 09, 2025 at 11:20:00PM +0100, Stefano Brivio wrote: > Introduce facilities for guest migration on top of vhost-user > infrastructure. Add migration facilities based on top of the current > vhost-user infrastructure, moving vu_migrate() and related functions > to migrate.c. >=20 > Versioned migration stages define function pointers to be called on > source or target, or data sections that need to be transferred. >=20 > The migration header consists of a magic number, a version number for the > encoding, and a "compat_version" which represents the oldest version which > is compatible with the current one. We don't use it yet, but that allows > for the future possibility of backwards compatible protocol extensions. >=20 > Co-authored-by: David Gibson > Signed-off-by: David Gibson > Signed-off-by: Stefano Brivio Reviewed-by: David Gibson with the exception of one nit, which I hope to send a fixup patch for today: [snip] > +/** > + * struct migrate_stage - Callbacks and parameters for one stage of migr= ation > + * @name: Stage name (for debugging) > + * @source: Callback to implement this stage on the source > + * @target: Callback to implement this stage on the target > + * @iov: Optional data section to transfer > + */ > +struct migrate_stage { > + const char *name; > + int (*source)(struct ctx *c, const struct migrate_stage *stage, int fd); > + int (*target)(struct ctx *c, const struct migrate_stage *stage, int fd); > + > + /* Add here separate rollback callbacks if needed */ > + > + struct iovec iov; We're no longer using this @iov field, and it can be removed. --=20 David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson --4zcTiZWNUucruYW/ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmepY6QACgkQzQJF27ox 2GfP4w/+K7uWdKRRlQ5KB+Q/7zSzk48tjAeMfayp+Uq23Axc9Xg+MkOszbaMK9m1 c6N9de2e3hL8ywyfIr4CyWhlLoNCcMnmbxxWmgnWvm+GP0fOpfO0QL7/0XuKUGHq YiJcN080V0lJzArTwoEaCcLfA+ZYyIDqXGPn3xWwmONHT8qmGZzkwJ0I9/oQ8qdy rDFJyi37jjbsM++i0X9yJITO4AgGgOAcOt6bu+gXS158nfgUNgABCDeleczjb5vQ H+G4yK/QbNP/QkNmdsjuy8QSAxqM9c2AEok9FPHU331F3ZSuivl2CUX/zUrE7lPZ jLU2pHna0n6QXqzkEo0NmZCdjicWWKQT/4EtZTbGf3Lh3nMKqPIvks2vca88eO4p lEV4YLRThlkrs64OqP/XCphyUq0OMktORlzsdSXxZVhKMhc1Rva3LRvXBIOKBkFU WbjzhRr27TiGE5JTej9PunMPwPV5lcmQEBGcfqoeFNpPgVSMAURbBLJvBiJZ9JfK F4J2rFmhb7MEnCajaEdPdcrOckBC7cRW59+D9beVAXOActRv68T90YTl8+mLXRwH XtfKFggOCE+pZU+XQAS+Fian4ZYntVJyEPraqTIY6XkrtccA4TnpmX3Mzm756Q5X 3gj2TQrfN6eG+g4mouqxMJ9S63FxU+pcj6Kekw81NAZYZL3LEzU= =X3YV -----END PGP SIGNATURE----- --4zcTiZWNUucruYW/--