From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 73F4D1459F6; Thu, 19 Mar 2026 13:43:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773927796; cv=none; b=VMg1hdqZeQFRpfIOHT89aLMcWRLC7b601OHVifExGV6mss+3Of6GWEaVS9iDTifAwQ3kTDyB3WenLJcl15oZKmFECo+scK3w8Uj6aQ43sXMhwZ+tx55egwMybqlL2BchtPPSyj8BuEtMgRKUD8UGcSdc+rE2XV5InC1SCQKmHVo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773927796; c=relaxed/simple; bh=yP3RZToQo4cbnbFuGrCYtRZiwEUU1IeskM85/sIfISw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Tg0BMisieeQrT8vtupI5CsHyX8h1UMBwUPIEa8wSCaWwDw6GN7i6kSrRcuiBZpzKAdf6/6/if6QK4SPrL7OBU1yxbew6BNXyXDS2T/KZe4OEAvDpOLJxtDj43VI7biTlM36cQ+Mjlbd0ImJGTsxiUT3tnLYZQpsqqDGyj6vfQtI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=uU18eSqg; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="uU18eSqg" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7C1AAC19424; Thu, 19 Mar 2026 13:43:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1773927796; bh=yP3RZToQo4cbnbFuGrCYtRZiwEUU1IeskM85/sIfISw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=uU18eSqgSvwhnfI7YjU8jPz2wisQpjSLUgHZ3EBr5aRqilr3QTd+MgT60y+v8T4Ac iw+U9qPnjIQAKYkchSBGS5tCwmSIUWhYIzUtjtnonUMFb+FdLRXiaKb1Z2BKJtQuPj eRPXVbOKQfTcnSNFhOtBgUF7bPu0oy5e4LtXwKnCriXdIBVmME+QWu2du/PGV3hMU9 PWg0V3tNiYQo3BYxLTIU/TJsrC9Kagq7Mojd62Ou5e4pajZ2HG+Jy+jATbEFRNihll HY0iFV5sSZYV6MpddEMq4OC0TQHmljRaNKGmehsUqTA6L/ATmhFfQmDvZZAhZiw76v 2TcHt6hGYpBnw== Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfauth.phl.internal (Postfix) with ESMTP id 498C6F4006B; Thu, 19 Mar 2026 09:43:14 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-06.internal (MEProxy); Thu, 19 Mar 2026 09:43:14 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdeftdejudeiucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepfffhvfevuffkfhggtggujgesthdtredttddtvdenucfhrhhomhepmfhirhihlhcu ufhhuhhtshgvmhgruhcuoehkrghssehkvghrnhgvlhdrohhrgheqnecuggftrfgrthhtvg hrnhepueeijeeiffekheeffffftdekleefleehhfefhfduheejhedvffeluedvudefgfek necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepkhhirh hilhhlodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdduieduudeivdeiheeh qddvkeeggeegjedvkedqkhgrsheppehkvghrnhgvlhdrohhrghesshhhuhhtvghmohhvrd hnrghmvgdpnhgspghrtghpthhtohephedtpdhmohguvgepshhmthhpohhuthdprhgtphht thhopegthhgrohdrghgrohesihhnthgvlhdrtghomhdprhgtphhtthhopehlihhnuhigqd hkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhig qdgtohgtoheslhhishhtshdrlhhinhhugidruggvvhdprhgtphhtthhopehkvhhmsehvgh gvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtohepsghinhgsihhnrdifuheslhhinhhu gidrihhnthgvlhdrtghomhdprhgtphhtthhopegurghnrdhjrdifihhllhhirghmshesih hnthgvlhdrtghomhdprhgtphhtthhopegurghvvgdrhhgrnhhsvghnsehlihhnuhigrdhi nhhtvghlrdgtohhmpdhrtghpthhtohepihhrrgdrfigvihhnhiesihhnthgvlhdrtghomh dprhgtphhtthhopehkrghirdhhuhgrnhhgsehinhhtvghlrdgtohhm X-ME-Proxy: Feedback-ID: i10464835:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 19 Mar 2026 09:43:11 -0400 (EDT) Date: Thu, 19 Mar 2026 13:43:07 +0000 From: Kiryl Shutsemau To: Chao Gao Cc: linux-kernel@vger.kernel.org, linux-coco@lists.linux.dev, kvm@vger.kernel.org, binbin.wu@linux.intel.com, dan.j.williams@intel.com, dave.hansen@linux.intel.com, ira.weiny@intel.com, kai.huang@intel.com, nik.borisov@suse.com, paulmck@kernel.org, pbonzini@redhat.com, reinette.chatre@intel.com, rick.p.edgecombe@intel.com, sagis@google.com, seanjc@google.com, tony.lindgren@linux.intel.com, vannapurve@google.com, vishal.l.verma@intel.com, yilun.xu@linux.intel.com, Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" Subject: Re: [PATCH v5 16/22] x86/virt/tdx: Update tdx_sysinfo and check features post-update Message-ID: References: <20260315135920.354657-1-chao.gao@intel.com> <20260315135920.354657-17-chao.gao@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260315135920.354657-17-chao.gao@intel.com> On Sun, Mar 15, 2026 at 06:58:36AM -0700, Chao Gao wrote: > tdx_sysinfo contains all metadata of the active TDX module, including > versions, supported features, and TDMR/TDCS/TDVPS information etc. These > values may change over updates. Blindly refreshing the entire tdx_sysinfo > could disrupt running software, as it may subtly rely on the previous state > unless proven otherwise. > > Adopt a conservative approach, like microcode updates, by only refreshing > version information that does not affect functionality, while ignoring > all other changes. This is acceptable as new modules are required to > maintain backward compatibility. > > Any updates to metadata beyond versions should be justified and reviewed on > a case-by-case basis. > > Note that preallocating a tdx_sys_info buffer before updates is to avoid > having to handle -ENOMEM when updating tdx_sysinfo after a successful > update. > > Signed-off-by: Chao Gao > Reviewed-by: Xu Yilun > Reviewed-by: Tony Lindgren > Reviewed-by: Kai Huang > Reviewed-by: Rick Edgecombe Reviewed-by: Kiryl Shutsemau (Meta) -- Kiryl Shutsemau / Kirill A. Shutemov