Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.47 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796387484; b=V6R9Y8hkqiN42HkFn7tjlIrOKNEqR36dgHfPG/bh5X03UA5qMG0ku1C/0jQ7KLU87fyy q5+tY7dy53hxbKMhknx+MQGLiVWd7rYYlXx/HuIBe5wd1u/P2fd29yc93v89hITxwUMMX M7NF0QsHyWXH8Oa4zM1Vn5uUwl9zt0s16nElyegwxHgMsl+Nkp6wxzHoT6lV/etobqFDL Xb2B5GN4WoXU2QNYUzkh3OvNmaDEYItFtyE7CnBmUT4Wrw0y1pzU4piR4BR8BLgFs3lNU 6pw7RlKIqyQIr3luxHN5cqFmCF3qpDL0PHmGGooq5DRPejGhYgMqX2MqaP4X4RhOr1Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796387484; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:Content-Transfer-Encoding:User-Agent:MIME-Version; bh=dbGT2X+sk4S8u8RfE58CxodbZv3u/rqwwAz302ne4MI=; b=oyt1DMvJwP+eepcZe/WJQIt9ZjRvZoPrmqkGHmXmCL9KZVFPzqRmj1IWCM9Tguhui0IA 8sMa0jdZBCzjeR25bMxt10jNclZ/hOxS4uDpBsfCbjAbpl7E9ywfKUv7akXa3cS68A42B GX1Ru4SBsEVjeumBY8/uwxTe6VIRStTncn6eOpcMt5AI+dxvFJEIZFte6u5cKOzrRuGT0 0FdkiPQm9a7NQBK+VY5Dq8Xva0KPI7uYUwTtOE5lkaT0q+NDVPotZ3VlRv+ng81+RYXqQ qJ84rZJGAeMQpo0jQABH+2RH3RBTUheRLvQc1XmTN5OXyoVPwJuwX1Nwyw1HPiSPw6Q== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=DsWJuyoJ; arc=none smtp.remote-ip=209.85.128.47 Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B2A70606A322 for ; Fri, 4 Dec 2026 12:31:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org B2A70606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=DsWJuyoJ Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-4bb6c7b6dbdso8648365e9.0 for ; Fri, 04 Dec 2026 04:31:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796387482; x=1796992282; darn=vger.kernel.org; h=mime-version:user-agent:content-transfer-encoding:content-type :references:in-reply-to:date:cc:to:from:subject:message-id:from:to :cc:subject:date:message-id:reply-to:content-type; bh=dbGT2X+sk4S8u8RfE58CxodbZv3u/rqwwAz302ne4MI=; b=DsWJuyoJ7Osw+0oAJ/CQiBgt0R670dgYy5GQohvFSyBEbkGmKT0vd41Qn6pQjBQbno 20Z85XCIHoMepv3xRqQ0NgHuHQJxdKdqjWL+fx9vRbMJ0YN8OLtSPRg72ZVq91TMsgtW LH1V1BBIhyCUrDEJQwhGVQm42Nz68r6ov7z80cUqfxX6vPH1j97T3QXp2gLZTw3eF8gI dnf1CYvWrwmLCSgOTwn6v/O3ID3VcSRmSaaNxbxffCu3/7ZBaZm/bODQUKZXC6WiPOEE DbT2SPtpyMgmX0xIs8HtQL5WUTtr5ijTA2JXD4tf2NVBdHRhOydG0i3qmMlh4VgraV/b AeLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796387482; x=1796992282; h=mime-version:user-agent:content-transfer-encoding:content-type :references:in-reply-to:date:cc:to:from:subject:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=dbGT2X+sk4S8u8RfE58CxodbZv3u/rqwwAz302ne4MI=; b=xITjEZsuwF952sq+zLWFMugGvBlFw1H7Ki8xgGZyKhYV5Vnua9YDmnT3J1rdJloSjy R2FUDSq4a8Uf3A1qOwavnv0f8JP7F9MviJIeSUesI3eYyYTKN9vLzp6xnL66MRv87vQj WSCqwzH022t/Vd5oioFJPoMsUvbtu0Kt591K5PWydlVl7tTfBnb6ycdQxu252R4TFZFf iXZIYt9wglf94XQMNtCP/V9IYTyRTFldxvUQtnmRbsQ7Z43G/j+DFSuGyierMLJYi7W0 AQqAS6DsmCeFPX8pzf1fhEQ3dr3fwG1ebQF2A7+ukH55piawKgvjj8A5r4TUcQmvfEUy PxYA== X-Forwarded-Encrypted: i=1; AL+hErHckiau0dj6JUcAg115IBBpSsAlTTmfmNtaTQ1grfnz4bpobp4+0AixMhx5SYUwUkQ/P3k=@vger.kernel.org X-Gm-Message-State: APuU4Z/HY9jPf70Lbbg/197epTFhkCl1GxD9l6LmhzeLF4kcywO1bTId Pa+XgZ36AYpF/s1fPuGxIjEz9jF/ELC/x7RePV0BRbOfuYLTxRnEinx8 X-Gm-Gg: AZFdTZfNg+2SSxmVr/t/T/zqZYG9Nx6dz117eVSVbXIf66bQTdb5gY2eLClHYdjngaB CRw8mNpBWynR755ziQfiflGttpQ1n+m9w90OPMVj0PhfV/ALKyqniulAw1D87UnEqGuTCYyt1+X 1EezNp25eB7XAq0wPOvdp4yJC6nSJPe1YvFSRHoet3OcTCMLXWLUI5zcSptTyVf813OIrRZ0kUb cNC/Csf1G1TvVirJzneE8fxWcit3XqwJ83V4WVLW3K9A06KttwrvGLhxQmbJruIlH90nbiGh7c5 QJTOnFsKFTMpGJmYNBhPC3s6xbnnSoCwexxVzhPih7614cA4RtnVyWi5ZZ7eC6vSyyqb8vFkbNX Ze8A398BVPmTpLgZoHyZQu1sMp3QHoTar/8LYmWG7DxIxCAktB0rcmjBqmYts4QEkBpFsEKcx2M mJK4MGxfkQ8mkFI0OtImYviNCvwkjH5wVonsRTGmUQB85T+TafVg2N4IWPrFm8K2Rllt/dUgZvc Q9LprEfXqWZ8NTxhTvnO/4TQRDqWjNXC7FoWQQ1AjkJi+M82CytwOOL0mEDqL+Q45KLKKOGo04r pJ9TXhWkrHGGLUtyUWWsGZ7d8CssrIc= X-Received: by 2002:a05:600c:4595:b0:4bb:5dbf:af06 with SMTP id 5b1f17b1804b1-4bbeb8795damr35044985e9.9.1796387481797; Fri, 04 Dec 2026 04:31:21 -0800 (PST) Received: from [10.245.245.46] ([134.191.227.48]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bbe00792c9sm159503545e9.3.2026.12.04.04.31.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Dec 2026 04:31:21 -0800 (PST) Message-ID: Subject: Re: [RFC PATCH v2 2/4] KVM: x86: Add optional KVM_CAP_LIVE_MIGRATION and KVM_MIGRATE_CMD From: Artem Bityutskiy To: "Serge Hallyn (AMD)" Cc: Tony Lindgren , Paolo Bonzini , Sean Christopherson , Peter Xu , Fabiano Rosas , Jon Grimm , Pankaj Gupta , Tom Lendacky , Marc Zyngier , Oliver Upton , Steven Price , Anup Patel , Samuel Ortiz , Jakub =?UTF-8?Q?R=C5=AF=C5=BEi=C4=8Dka?= , =?ISO-8859-1?Q?J=F6rg_R=F6del?= , Vishal Annapurve , Elena Reshetova , Kishen Maloor , Mika Westerberg , Peter Fang , Rick Edgecombe , Xiaoyao Li , Xu Yilun , kvm@vger.kernel.org, Tycho Andersen , Mahmoud Adam Date: Fri, 04 Dec 2026 14:31:16 +0200 In-Reply-To: References: <20260831071304.762939-1-tony.lindgren@linux.intel.com> <20260831071304.762939-3-tony.lindgren@linux.intel.com> <74c6eec32fec9b7db75a8b4cd7f8e00d581eab5f.camel@gmail.com> <4aba17135640e38f41b714b36d3db4807194c843.camel@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.60.2 (3.60.2-3.fc44) X-Mailing-List: kvm@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 On Thu, 2026-12-03 at 11:07 -0600, Serge Hallyn (AMD) wrote: > > For AMD, I guess the kernel could simply prepend or append the 40-byte > > metadata to the exported data. Yes, there may be challenges of "wasted > > space" or "gaps" in the blob, which are transferred over the wire. But > > I'd say each platform should deal with them somehow, or just accept > > the small wastage. >=20 > Yup, that's what I had originally been planning to do. My thought here > was that if every coco platform will output a separate stream of > metadata, everything might be easier to follow if we just make that > explicit in the api. But since the number of extra buffers varies, then > I agree, sticking with one buffer is good. Just to explore this line of thought a bit further, here=E2=80=99s what I= =E2=80=99m thinking. Both TDX and ARG require the corresponding metadata and page data together at import time. Sending them over separate streams would require matching them up again at the destination. But! Separate buffers in the ioctl level do not necessarily mean separate network streams. We could have one buffer for encrypted pages and another for the metadata, but send them together over the same channel as one bundle. For AMD, the metadata buffer would contain the metadata header and per-page metadata (AKA "metadata information" in ARG terms). For TDX, it would contain MBMD, GPA List and MAC Pages. This could help reducing the wasted space in the buffers (may be), but it would add complexity. And from upstreaming point of view - simpler is better. Artem.