From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) (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 17100344044 for ; Mon, 19 Jan 2026 08:41:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=198.175.65.15 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768812089; cv=fail; b=qt7GMCn2ssZo27NDFbU7VEkO3+7SaFfjpEKmFP0yEVf06pOKQT950Egk/65jbANApjyj8zYmBKLFcIdFYFrSOWwwzFsuYZRwJ9vKR63MbS6QKOeCODZ0UYohl0NCD8biOnmbz+zS48u0j1PrlmuXKhE+OLju7ZOAKbwiZhfcyWU= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768812089; c=relaxed/simple; bh=MsxaPpnhXQvPG9KVhtob9e6/qud8McFagf0QT8d/oWI=; h=Date:From:To:CC:Subject:Message-ID:References:Content-Type: Content-Disposition:In-Reply-To:MIME-Version; b=itta4aCh9z6IKd5C8dlsfv/UhA7zWpaydUz0m2HGYXx4SA3fLUzfSEgdUrZN1seL480BRSTw4Ne+D/Rwj25lUNLZpi/UKecej+R5kU0V7xwDcQuHtwwaY9mytnlRXeO/uavdF/Q5AqF7GBT05dNWO0CPJvrknehlOkCKWD6Z/g8= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=eaFY5C7T; arc=fail smtp.client-ip=198.175.65.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="eaFY5C7T" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1768812086; x=1800348086; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=MsxaPpnhXQvPG9KVhtob9e6/qud8McFagf0QT8d/oWI=; b=eaFY5C7T+G/LAEAO44Q2+9czs7Sa7FGxRj5E95aJasJZuPa7vtGfMTGK JrJkuIJH+QbnSUeFkuc/CxMwMV3+6julXibFsGhfXYxU1gwRRuEm0y88a tqpbCXiKuHm+LmCLxoTPxS8k8D3uIaPFioh8+I37jQ3PBKFM3SzcvzndP c9m2ml7jzN//KndERCuGdoonktBCl8861fWp6qmF6VvA+fGYCTbxQflXQ 7Ji7BUgeVwuOlwFOluZFI7FbLArWxD4x2JgkwHQR/YU0g9Fib+q+gYj2D FaNzPZpG6sWIQfQ1lait5H7IPoxMo+S7MOxjbEzl0XX9Z+o6AUDrqi/bm Q==; X-CSE-ConnectionGUID: ylKRBIn4R82f1gkRK/GueA== X-CSE-MsgGUID: ZY1VzVpTRieOtvIFhPGFuA== X-IronPort-AV: E=McAfee;i="6800,10657,11675"; a="73649699" X-IronPort-AV: E=Sophos;i="6.21,237,1763452800"; d="scan'208";a="73649699" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jan 2026 00:41:23 -0800 X-CSE-ConnectionGUID: +3pKZYz3RQicogBW9qUCYg== X-CSE-MsgGUID: godDdHCrTMuXNPWeMHTK4g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,237,1763452800"; d="scan'208";a="210295305" Received: from fmsmsx901.amr.corp.intel.com ([10.18.126.90]) by fmviesa005.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jan 2026 00:41:20 -0800 Received: from FMSMSX902.amr.corp.intel.com (10.18.126.91) by fmsmsx901.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.35; Mon, 19 Jan 2026 00:41:19 -0800 Received: from fmsedg903.ED.cps.intel.com (10.1.192.145) by FMSMSX902.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.35 via Frontend Transport; Mon, 19 Jan 2026 00:41:19 -0800 Received: from PH7PR06CU001.outbound.protection.outlook.com (52.101.201.59) by edgegateway.intel.com (192.55.55.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.29; Mon, 19 Jan 2026 00:41:18 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=QZ5e+sD1cOO83QBgqnjZv1od3JhaMZfCwKSmLWunR35pEo93b6lM4EQ0BK3YsjB8JlZiSSneNMSZ0KC6JQYTSO2DEaXG9kGY3mPcCcGV8C/ljYy1uh0ZPLFmDksx7yQjdbeaLci2fqkISKEsgs2SHixPlQbVeqxaVhnsnZDjVifdcrFDgQtBEmSdv1cKlJjTigJuzSaxwbXvIfI1sBtrcprXQzbYOp+iu3HnNJB/7IwKW3tspo6pzpXCPxYqExbGKf47S9Br/HJiIE1q1j6uYsFVD4/DO/GexsS/mRwMa69twAwCbRYxRQnP8uoFRD/ord6JmbUjGn41Op0DG64prQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=mM3IPKYNXMhPjXgkXIWSOVHI8xniWZQUcuzYiIEY++s=; b=flvHbo+ZK2sGkRKEWNANgwR3AhmWtE30xGBDW8E20aFhcWkBiq1qFZiCJjAYlnKfvRalfczv18Tn9TfvjnJaTzFlpDMbnHE0h4bzbTUPAeyMzX01EkwpglJ26vI4PaxmB4ptj84W5s7O2TPqVQ0l9gE6F83Bxx+fcR4oiOEZrIOjj97wnsfa2OrU0rcTGPX8618Cqt70Iz7T0wFx4W90i0vmrr3oStvNeAnPqFST40DVWk5SuCO3UfKjTH983S5mi22fLOSROrJ1CoYg/NQ33bL98xyLFJG/HL6Znuv5Ottsdqj9qwl/d8IXcGxgqyJmZ0rTZH0Z8z1sLhS6O9SUiw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from CH3PR11MB8660.namprd11.prod.outlook.com (2603:10b6:610:1ce::13) by BL3PR11MB6361.namprd11.prod.outlook.com (2603:10b6:208:3b4::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9520.6; Mon, 19 Jan 2026 08:41:15 +0000 Received: from CH3PR11MB8660.namprd11.prod.outlook.com ([fe80::fdc2:40ba:101d:40bf]) by CH3PR11MB8660.namprd11.prod.outlook.com ([fe80::fdc2:40ba:101d:40bf%6]) with mapi id 15.20.9520.010; Mon, 19 Jan 2026 08:41:15 +0000 Date: Mon, 19 Jan 2026 16:41:02 +0800 From: Chao Gao To: Binbin Wu CC: , , , , , , , , , , , , Farrah Chen , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , "Kirill A. Shutemov" , Paolo Bonzini , "Rick Edgecombe" Subject: Re: [PATCH v2 14/21] x86/virt/seamldr: Shut down the current TDX module Message-ID: References: <20251001025442.427697-1-chao.gao@intel.com> <20251001025442.427697-15-chao.gao@intel.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: X-ClientProxiedBy: TP0P295CA0037.TWNP295.PROD.OUTLOOK.COM (2603:1096:910:4::9) To CH3PR11MB8660.namprd11.prod.outlook.com (2603:10b6:610:1ce::13) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH3PR11MB8660:EE_|BL3PR11MB6361:EE_ X-MS-Office365-Filtering-Correlation-Id: f2a27053-84f2-4f0d-4350-08de573681fe X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014|7416014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?aWY1rgHRO8zLAJv6ANOPuPM3IDT6wRBxckiHx0RavvneIUhgxODXGso03tiO?= =?us-ascii?Q?2+PoQqywN5+ofdd2qK3vluqVYjeQSN+tmVdxCKaRjr6LMV0p3gcIuybpaW0U?= =?us-ascii?Q?dNWKA+YBZnRb8+ST+LDUQocmxI6LP5s4ku9+xyP+YxcOv1F6Q/72OtwFTbVo?= =?us-ascii?Q?hKqwJ3wYSAH47gQLkAISwGoU0vH6nzC5oNwdYENjhHXRQ/hs7pK08PMKvMs0?= =?us-ascii?Q?X9BXd7FXNIfcDEyZ2d3G8yQaYqf3C7tzeajVFqzzypKwM98Fx8FLvBXSqjP8?= =?us-ascii?Q?SOf91cTiGi5+NH8KgEyH6O0AJJXvFPrb0ca9gaCmRQAfnWBvbOhX7KmOPvX4?= =?us-ascii?Q?DxVLq9yQ9SCWPCvU81x2X8PzMDrXjLzem7XxUlM3PYfO+xXwHBhjdEToaRp+?= =?us-ascii?Q?h/GzcvyKK3CoZo5xRGJS75ELtC7c4SIqbKkuav9pJHRMmbicuX2uKtumPV6X?= =?us-ascii?Q?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q/iAinGh0ZwLzg7yNadl4v/X4P3w9O15XpK8F?= =?us-ascii?Q?gCqo57kIoG+ahNAfyLjMpVrB5GK3rCuGDvnz1pBdGPo1f0uWQPN/8GmAf/iJ?= =?us-ascii?Q?QcluNERr5OwEyNjNUKke9yOeyNDX4kHU1amKXZtObFuMUiCVY63biFbUsGHR?= =?us-ascii?Q?eI9+Cbft4l4OUsiktCpF46NqRbVyUI/cHTqQdcKprqM2E4bi0enV1ckusCYa?= =?us-ascii?Q?dxd1BO1hXloPhgOJRnY=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CH3PR11MB8660.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(376014)(7416014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?D5r6WhjfeBH1mMN+DPry8uSe3Dm1Lf/QGZLshO0lT+liI6twe8f4HzmbHR7f?= =?us-ascii?Q?QyJwH8EzowFzNofEmIpIvQlGSq0PdO26fkEBcv37zAQDCd63EN4IqRqqmEP7?= =?us-ascii?Q?M5M2fYN61okIAH7ceMxBjMK2QxE27RJuacJLvELROhY1+t5eadlngy7gRtTC?= =?us-ascii?Q?sWMST7tB7J7KPvfgkyhKBtqM68xcThFGyP/r4S89Ic2QTwJGz+GH6sih5LvY?= =?us-ascii?Q?bHkwgn05NfJ6oTVcaKYl7akNARrtkZYbAl8iu1eKr9O9tLrKrBlx1Gmo/jJn?= =?us-ascii?Q?CZIqRj/GrlfwHcJgIVIQ5zzn8YBVfqYlZRpe3qYbNrURNIEbZRac6UU7J8HL?= =?us-ascii?Q?41X+NJigbb8iyY5Nv0NMZyenxINXaXQPizMmVBEp1DIAMoxHzG+dihhm7w9T?= =?us-ascii?Q?u3mfgVeXvy/LLFfmq/k6KDgnxEkl90lzmunhVbuUUuowEbi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ZYro8aunnnyyC8iCq0XFTuXPUD3WI97nTiX2K6/HNp?= =?us-ascii?Q?0dk4PX0Yoe7NxWKzCU1XbAGS9uwT124KO45y0t6FCBHSrzdOUCPbxDJ3AKGj?= =?us-ascii?Q?Yl1AqPzTCyKLgLl6PDyWVfnzBXUbnlw8hUhCJQ8yx/tU4/a7vP2ONS/T4aFF?= =?us-ascii?Q?KMS8/6BTd1wtA/s3kWHRsmN6oDTHrIc9S21L8zBO+An3EZREtyRZ+BjbGJqR?= =?us-ascii?Q?aFHKp0YNw40D0agUHTpsNWFpLkCNchtxWlXdeAzbXvjceulr1az66l728WJf?= =?us-ascii?Q?gvOWJcO5hCQt2AoKADGnfx3aPKZjLgEv5WP4Hj496vVyM5k3IJYGjV/tQZTO?= =?us-ascii?Q?buVIKq0bF906XZ3w7l00K0qJkezRh91fwYcL0X5aT3eLsNb98vZYCdTjeUJ7?= =?us-ascii?Q?raxQBGVPIA=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: f2a27053-84f2-4f0d-4350-08de573681fe X-MS-Exchange-CrossTenant-AuthSource: CH3PR11MB8660.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2026 08:41:15.7238 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: cZcTRSyiKXmW+Rc+zIk2AffZJjEqmftYEep6Aj4W6PJvnGaeSofTCdjZCvrkxfT/PNVPQ8jcWSsNe9nnocGY2g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL3PR11MB6361 X-OriginatorOrg: intel.com On Wed, Dec 03, 2025 at 10:24:58AM +0800, Binbin Wu wrote: > > >On 10/1/2025 10:52 AM, Chao Gao wrote: >> TDX Module updates request shutting down the existing TDX module. >> During this shutdown, the module generates hand-off data, which captures >> the module's states essential for preserving running TDs. The new TDX >> Module can utilize this hand-off data to establish its states. >> >> Invoke the TDH_SYS_SHUTDOWN SEAMCALL on one CPU to perform the shutdown. >> This SEAMCALL requires a hand-off module version. Use the module's own >> hand-off version, as it is the highest version the module can produce and >> is more likely to be compatible with new modules as new modules likely have >> higher hand-off version. > >According to the TDX module base spec (348549006), each TDX module is built with >TDX Module Handoff Constants, including No-Downgrade Flag. If the current TDX >module is built with NO_DOWNGRADE=1, the hand-off module version must be the >current TDX module's HV. > >This patch series doesn't seems to handle No-Downgrade Flag, IIUC it needs >to use the current TDX module's HV to avoid failures. Note: this patch always uses the current TDX module's HV. So, it won't fail regardlss of No-Downgrade flag. > >About "hand-off version" and "No-Downgrade Flag", I still have some questions. >Is it possible that two TDX module versions have the same hand-off version? Yes. >If the newer TDX module built with NO_DOWNGRADE=1, is it possible to downgrade >to the older TDX module when they are using the same hand-off version? AFAIK, this is possible in TDX architecture as long as the SEAMSVN (TDX module's SVN) doesn't downgrade. But for now, there is no plan to support downgrade (or roll-back) in any case as it may result in lost features and cause compatibility issues. so, the userspace tool [1] now rejects any downgrade attempts [1]: https://github.com/intel/confidential-computing.tdx.tdx-module.binaries/blob/28a4baabc268b1998ec553ab9009f4fd3efd309d/version_select_and_load.py#L301