From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=192.198.163.13 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796101065; b=qzqA8tf3izsXkVhPN4NDbkZKgBAlt/aPOppiQijeilGWgKkc2QD2THwH8owAX7V98598 Vu9tif2o8ziFpI676FUhObTzQemqEb/xuOA6p3WSgwIoLp7VAc5WIvoGAPJ5XwZH56E1F YO/KDKD6XepqFjdJ6z6Zu/7b3Ch/UCtE3TF94eqDzgntzEYUhqlc03Z5m3ru8/jUNHavb gCqlz3C29U0tm/1WES7wBrLoK6KZWyi+9dtFpxk6SI9WZBdLQ+py7IrKJNfvzoTbbOvF4 8ScwgrnIB9UEa46TTIsZDNZnkwCqsxmUe29j0PMDael5jURP63Bs5mS4jUOAaSK1trQ== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796101065; h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID: X-IronPort-AV:X-IronPort-AV:Received:X-CSE-ConnectionGUID: X-CSE-MsgGUID:X-ExtLoop1:X-IronPort-AV:Received:Received:Received: Received:Received:Received:Date:From:To:CC:Subject:Message-ID: References:Content-Type:Content-Disposition:In-Reply-To: X-ClientProxiedBy:MIME-Version:X-MS-PublicTrafficType: X-MS-TrafficTypeDiagnostic:X-MS-Office365-Filtering-Correlation-Id: X-MS-Exchange-SenderADCheck:X-MS-Exchange-AntiSpam-Relay: X-Microsoft-Antispam:X-Microsoft-Antispam-Message-Info: X-Forefront-Antispam-Report: X-MS-Exchange-AntiSpam-MessageData-ChunkCount: X-MS-Exchange-AntiSpam-MessageData-0:X-Exchange-RoutingPolicyChecked: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-AuthSource:X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-OriginalArrivalTime: X-MS-Exchange-CrossTenant-FromEntityHeader: X-MS-Exchange-CrossTenant-Id:X-MS-Exchange-CrossTenant-MailboxType: X-MS-Exchange-CrossTenant-UserPrincipalName: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-OriginatorOrg; bh=I/GTJU6M8gFXJFER3RDxCp6Y6NitCo1CKE6naOiQIsk=; b=E9jetZg7lcC3DX6FY3o4SISNRJzZPLn1sBT3oIEguvJH8Zkz3Q6s41aDdJ9GhRPBjPZw orzFZM5jkxF36EfFMncNaalUBRN104pFJ6hn+dYIOWQ7u3jb+s+WY407lJdpPqoI1WRb3 QfM/U+mKpZlDci60AI6HK58BD+8D8uVQxl9pQZMzIQ8yI5CjOTq4jbrplYNN9z8ZpAk2m t23/YMzx7BoACq6AC6zCMn8yqFwctu+3VU0hBQSXtCbD8WM9csddD+tHVh2bF0IYlU4dF NmyG7K/TNjvXRyn/fMq4PhukYhfLOVw5ohHZbGDw0shQkWD2jjoyUYGl2xfTSTH06Dw== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=P3Oxe7q1; arc=pass header.oldest-pass=0 smtp.remote-ip=192.198.163.13 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3E78F606A320 for ; Tue, 1 Dec 2026 04:57:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 3E78F606A320 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.a=rsa-sha256 header.s=Intel header.b=P3Oxe7q1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796101065; x=1827637065; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=I/GTJU6M8gFXJFER3RDxCp6Y6NitCo1CKE6naOiQIsk=; b=P3Oxe7q1m925J0Qwq+CsftA3KM5pSX+Ak6dS3XaYm7BF8MWV6aVZ6Ltm kX7xL3V3bGWSH/m/21ZkoxIpdHdv8khDf1cWBOTpH6MOuSNRD8G3BOHdK fpPIrVVLV2K+qCjoMs6wxquAAGdrpy6QiuR2dsXOSkII9LOUgURQBGL+a qf0Z6lulfZwxopBcXhmHPYUIS7sh31I0fVLed2CyblVr+J0+KAxiZUnwr EnsxiqMo+qmHT+E+0ZK7y+eOqUqvrpPZ9jIRzrZbUaxIlYqNTkAl5RCbn Ay6inDyXMVPIjZhjQKZtFxqD3DzO0YF3PPUtr7LXCRrWFODNLuYoMayLj A==; X-CSE-ConnectionGUID: 4cgku5maQQ2v4U1Ha9t0CQ== X-CSE-MsgGUID: UhMNdT2TRgar43+oKgGnTA== X-IronPort-AV: E=McAfee;i="6800,10657,11982"; a="4922139" X-IronPort-AV: E=Sophos;i="6.27,244,1787036400"; d="scan'208";a="4922139" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2026 20:57:44 -0800 X-CSE-ConnectionGUID: vBJdIVx8R8an5TEa+suWNA== X-CSE-MsgGUID: Ilew6JjVQduTvImWKgkwkQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,244,1787036400"; d="scan'208";a="13313411" Received: from fmsmsx901.amr.corp.intel.com ([10.18.126.90]) by orviesa001.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2026 20:57:43 -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.57; Mon, 30 Nov 2026 20:57:42 -0800 Received: from fmsedg901.ED.cps.intel.com (10.1.192.143) 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.57 via Frontend Transport; Mon, 30 Nov 2026 20:57:42 -0800 Received: from PH8PR06CU001.outbound.protection.outlook.com (40.107.209.48) by edgegateway.intel.com (192.55.55.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.57; Mon, 30 Nov 2026 20:57:42 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=wR8pox6JgALf2U1kIq5ScRHlm+c/JP6ypHzxQgcBjYu+40IbzFpPo6zvo4DOeW+CLsJrR5gP9e6j8/pQ/zKbGANph6SpyavBVyzxuWs8r3l4Yglf6Tkv9E2jDvsSrYWjSaWZNHYHCKtbs0w5G9u7IjCHexiZaGXhiplNFGCdwpfFC34/4B6LGrmu2jRB+5y0tX+4ermvQMGicjUBTQRcyg+otorTPhbAAEneffad5OGsRb0hO1zQCSeLFRYHF9+oXIfhEkcRXQajc4Urhg8yQUCIIsx39AM78ZxVnXHDdSUJ0Rzdk6MSGmwMa53IzKZN3qZBcZWE9LHDQzb/FJgzuw== 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=I/GTJU6M8gFXJFER3RDxCp6Y6NitCo1CKE6naOiQIsk=; b=riaOe0GPNMTf8FyL94YY8/bHp8O2zo1B/u/09YysFjgD9nGY+7E8DzyPZGQXYjsJgoKDNT2tgPCldSRg2yHlNto7uvZix+tTBlkg0yBiFJVogepu30mmZoH2OZtF++kGpRkPxOiD++5MrkmrsWj5NcYp+rFCFAJaBEAT8OdV+nLcaTQ+gneNDSiSSlpub1VFlYoOf08c3MgIcMiUeRHLdCcSn2BSadLq/RPt0lUDgf/x1PQPLJw43oPbCkpG0eUFUIs6dsfl7oSg4g0NkB+KQRPtlQv6Dau0CJgeT/jouc2rKnq+iByyv+T6wZ7EBXrmtfJSzIKUkyQuINq+UUJxtQ== 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: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from IA0PR11MB8380.namprd11.prod.outlook.com (2603:10b6:208:485::21) by SJ0PR11MB5072.namprd11.prod.outlook.com (2603:10b6:a03:2db::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.662.13; Tue, 1 Dec 2026 04:57:38 +0000 Received: from IA0PR11MB8380.namprd11.prod.outlook.com ([fe80::ea8e:eec4:f8d3:f95d]) by IA0PR11MB8380.namprd11.prod.outlook.com ([fe80::ea8e:eec4:f8d3:f95d%5]) with mapi id 15.21.0662.007; Tue, 1 Dec 2026 04:57:37 +0000 Date: Tue, 1 Dec 2026 12:57:25 +0800 From: Chao Gao To: Xu Yilun CC: "Edgecombe, Rick P" , "hpa@zytor.com" , "Xu, Yilun" , "bp@alien8.de" , "baolu.lu@linux.intel.com" , "Peng, Chao P" , "dave.hansen@linux.intel.com" , "linux-kernel@vger.kernel.org" , "mingo@redhat.com" , "x86@kernel.org" , "kvm@vger.kernel.org" , "linux-coco@lists.linux.dev" , "Tian, Kevin" , "tglx@kernel.org" , "kas@kernel.org" Subject: Re: [RFC PATCH 2/7] coco/tdx-host: Establish an SPDM session with the device Message-ID: References: <20261116111037.3478844-1-chao.gao@intel.com> <20261116111037.3478844-3-chao.gao@intel.com> <30852ad50fb3085de04145342aaf1caf145488fe.camel@intel.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-ClientProxiedBy: SI1PR02CA0039.apcprd02.prod.outlook.com (2603:1096:4:1f6::9) To IA0PR11MB8380.namprd11.prod.outlook.com (2603:10b6:208:485::21) X-Mailing-List: linux-coco@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: IA0PR11MB8380:EE_|SJ0PR11MB5072:EE_ X-MS-Office365-Filtering-Correlation-Id: ccb717bd-cd45-48e9-dc36-08df4f679e24 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|376014|7416014|23010399003|1800799024|4143699003|6133799003|22082099003|18002099003|3023799007|11063799006|260925022911599003|10067099003|260925021911599003|260925021311599003|56012099006|261026140227099003|261026121527099003|261028144727099003|261009223027099003|261022075727099003|261102123227099003|261022105027099003|261021121427099003; X-Microsoft-Antispam-Message-Info: w/W9tM3XpO4w7CeNyXEk/hc2If/S4wSTtTeSDr9UiLfK+Z8mmB7RUk2EvVV5Phf8kuYbluRXM50O4KOmiwVm+GdbDYKEk1EQTnhX7ryLul0J9PLVbWSYgDIhEZMy9oCfLDD1xbHH+lzsMwDUUjcjgpN2jshmXuXQ3E8YOtxKIsDUlEDp0IUTnuWofOpnz1m+Ay2ZBjWhT87FnpgrQabEGpX+jfmZ4wt1oVdpXu+ZeY7dV3PLxwiqUnGncCmZkXSj/lQSJrD84RswSPgV/um901ZhsOeBqhgxdtIXb0fhvap7r1eoh/FJ20o0Qtynb9n/vimyegvkD4OmjfLib6d6et9g/DyUH9t8mEO2Waq1AcKk/cn3ud5/ilfD+ZPyHfy7ky33LZAWc0d8PBonBbYAgFkX1JadBcTSZXTClBSsSoAb6IUiRImivVxatmzU45s0BtA+lxhNGrMtc1Jahk6i9dl50kKatT3/exZFa5Rhauss4lpiu2GbGMRKLpyR7w4BF608McuK8I8JL/IaXsV31W+7n2uZkObsm/p5NbkNtgwPbG6d0qUjsVBplnLRZynU3ur48ePsn4e9RUd4T0YnFCKLkuYbshOf9LPwjuMCHLKD68lc082MzJ5SvKEPmMH+ X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:IA0PR11MB8380.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(376014)(7416014)(23010399003)(1800799024)(4143699003)(6133799003)(22082099003)(18002099003)(3023799007)(11063799006)(260925022911599003)(10067099003)(260925021911599003)(260925021311599003)(56012099006)(261026140227099003)(261026121527099003)(261028144727099003)(261009223027099003)(261022075727099003)(261102123227099003)(261022105027099003)(261021121427099003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?qh/jpMRCgH56fqHwvhIdXk64FGCSUpDOqmN8AEiDbgcG4YkPzYUcdUOm2Idj?= =?us-ascii?Q?0IG/ZXYWzprf3DfxJgIvxZU5PS1UkYViHQNqe6OjeUi5PT0/Nfb+XAWO+6eB?= =?us-ascii?Q?iSdLwB/sSabN5Go9xjbO506T7KtzfOA1ZY9kh2PeuaVKWXisLoQItvb6ZmE7?= =?us-ascii?Q?dI6OlA+1QtSWfs4OgSVWvzy4z/yoeG235mB30F8MIlhF6IrovCd56Kq+kMmN?= =?us-ascii?Q?zRSVb5ihrLoA1rv+e0n2MjjU6Am0x/KpVpnHGgEglXw9dcijAwKUE5hX9JXS?= =?us-ascii?Q?vaofhft347KTQlyLfUjut+BfNK6kX0FHBtReCFLvKSC4YEIVqDJAjv7uTmrs?= =?us-ascii?Q?jR0SMj5k/3J3cqGZIrmWKmCygWdIPWqRnDa63/n+RjRXEhH4yIa5riwXTdup?= =?us-ascii?Q?WXKMxjg6MYeYZ2vNvAF2mE6GCnvg02DQf0tx9m/v/2RNe0K9Iu3pyUbn8v0z?= =?us-ascii?Q?b2UQynZTSZ1N3y4tWG0VsfSCpda0Cef3Y8dzqHWqCr5ID8o43WQ16K8yt2Pj?= =?us-ascii?Q?1bGshjaaWQHNuIZRnEgPFEMVjEHLLJRX4eo74AwfX/w3U08cSPJ7Uv6jMMdP?= =?us-ascii?Q?r5NwU/15cnv0qTqoYJSaTNHuh1MpmdltBTZ2eWpa+nhNnAD11DDpr6UTOgfm?= =?us-ascii?Q?zcQ2bU1mnbK+JYFvj8lVKDYJZZcC3aXGh5zXDu2WfR1oPvcL7iou1D2GEBPT?= =?us-ascii?Q?yQk8QW+dzR/eIUTQCVmdBt/e50+C6jwqezDSiCdc4RQp0dB6fgdzVPHkyVSF?= =?us-ascii?Q?oPg3o0grcR4mXDFN4MFMPONs/PKki99V9USBZ/S7oiZ4JGn2lyRwHbuDqsXy?= =?us-ascii?Q?677jskZMnWk2v/sqsD5c5WgCiG6FqEEqxpOoJnfWfn2TminL6uOnA30dGSUi?= =?us-ascii?Q?3zRYL4YkOACifm6VoOHeOsNz9DFpGDEJ3EQ4NaaeYQIN4wk0hXbCfKZrp4tR?= =?us-ascii?Q?Z99iGzPRIE2iHaWDgZqrS7eUntXpaqTYEoPi9Te4zhnSoEb27e9b2z472DsN?= =?us-ascii?Q?0t/893xVH20LJuqViRCbEuh6TuVAxlVCJ61/FzI/zAQ2xm6rPqUk0boPEdpH?= =?us-ascii?Q?khI6TtFa1ayen6zk2rFkK6Td17pYnM9FVOQqQ1/k9DYMKcE2MqXYLImmxDYi?= =?us-ascii?Q?9VfWGOSqXjAUD6C9ETl/+kH28r651RznuaMLFNExv5Yp+s9Gd5rqsHMn3onK?= =?us-ascii?Q?4qj9poshtPBjuWcYYtih9ULYhb5brxr43zc/C4S9fWlAkPBPsBjIdRqfsFdB?= =?us-ascii?Q?Fzse3t2RTyv0EGltrASpc3/JqfAjkg4G8tPQye3TjnB0EgNb/20JtPTuf2x0?= =?us-ascii?Q?NQjWaHDHBUxBqfTQfk7ZCZ5pJMsEqwW51RTWpWgQHWnUorwNESk2t+917NGD?= =?us-ascii?Q?MrohTfA0E2SzDR+Dv25fkcxLBgZeJIUEP7VSZIVV92pF+Dr7YVlptPDwjVgU?= =?us-ascii?Q?fbCMBPhzmWThCKFEWLwy/zwlSuBo2xY5hBXYZz/lQzJM2Y0vl93KPNN6C3xd?= =?us-ascii?Q?IQA0Jo8kwJrj/U5/bz5CIIkPySIWsJ/Wjhzsbu1oMYK5/UPw3FOw1GtPV779?= =?us-ascii?Q?qJ3fJ9Zsp7/+U4srdI8cKVA5qc2NgbtxMGEotzyUeY8Bu3c/C0ONuN11rldB?= =?us-ascii?Q?sSBodYX5shGo3GPrcLRVkTrBlCrwePCxXtKDcz0+7yiJbdRR3J/nSkGyC18r?= =?us-ascii?Q?Rid9b6R/V8utlliOKCG6qH85gAHUsEjEIVTuAaYYQyuznWYM/y3rdGOjI46M?= =?us-ascii?Q?lmIwM2DeZA=3D=3D?= X-Exchange-RoutingPolicyChecked: ddIlw+dVQlvrxOCv0r2RjI4YFmq/76u9HwPLxRP97+WsfpJkaQas62kVZYj3J1JcYGSMUVxv/XwM0ozBZF22fk+NIgRW0iO9OJSN+tEjio9Go2q4+JADyUm6MW+7lQRsHlrT8UwRfT4B4ETYBVBeHpNgbeUCxOToonF6HVGL2V1T72KvERlf1oXbNookR7KgdSw2x7XBIvb34yZkEGobCayPfViGwjpF0syTKI8/9ZpGe8Dhh5l5Qu26LUhrw3BKpprP7vZ6lgul3/SV9dV8P2uEVUX3uq6obanBwfpAI45rXXJiUfgU8Q+tqDRTwfb/vT/ZLnQA79AZzKAzO9JAXw== X-MS-Exchange-CrossTenant-Network-Message-Id: ccb717bd-cd45-48e9-dc36-08df4f679e24 X-MS-Exchange-CrossTenant-AuthSource: IA0PR11MB8380.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Dec 2026 04:57:36.9403 (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: kXLsje89uiu3PBR5puLXGNeCdK4lVztosGsw0S9B+/h47/mE0JvWICBv7fudzklFoYwN69Z8P7fuiNGGbrf0SA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR11MB5072 X-OriginatorOrg: intel.com On Mon, Nov 30, 2026 at 07:41:03PM +0800, Chao Gao wrote: >On Sat, Nov 28, 2026 at 05:25:14PM +0800, Xu Yilun wrote: >>> > > > Pass the messages through two pages per device, one for each direction. >>> > > > One pair is enough because PCI/TSM serializes operations on a device. >>> > > >>> > > This probably needs more explanation. >> >>Though this is not the answer to Rick's concern... > >Right, I misread Rick's comment as asking why one pair is enough. > >>> I mean there is a buffer for request and a separate buffer for the response. >>> Once the request is sent, why can't the same buffer be used to read back the >>> response? This may be a lack of understanding by me of DOE. >> >>I believe it is possible. The DOE protocol defines serialized >>request/response flow. And the pci_doe() code does so, the entire >>request payload must be sent before receiving any response payload. >> >>I didn't try on real TDX module if tdh_spdm_connect/disconnect/mng can >>work with one buffer, but don't see reason why it can't. > >Using the same buffer may work, but I do not think it is worth doing >now. Both pci_doe() and the TDX module's SPDM SEAMCALLs take separate >request and response buffers, and neither says that the two may >overlap. The saving would only be one page per device. And the AMD >implementation and the upcoming Arm series [1] use two buffers as well. I looked into the history of pci_doe() and the AMD implementation again, so here is a more complete answer. Nobody has discussed why pci_doe() accepts two buffers on the list. The API has taken separate request and response buffers since its first posting [1]. AMD SEV-TIO [2] cannot share them. The firmware writes the request, so that buffer must be a firmware-owned page, which the host cannot write. The host writes the response, so that buffer must be host-writable. The pci_doe() was not designed for this, but it fits. TDX has no such constraint, and both buffers are normal host pages. One buffer would likely work. But it would rely on pci_doe() sending the whole request before storing any of the response, and on the TDX module accepting the same page for both directions. Neither is documented. And the code would get harder to follow. The same page would be passed as both the const request and the response, which needs a comment to explain why it is safe. The SEAMCALL wrappers would either take the same page twice or drop a parameter and no longer match the SEAMCALL ABI. All of that would save one page per device, so I would keep two buffers. Please let me know if you see it differently. [1]: https://lore.kernel.org/linux-pci/7ced46eaf68bed71b6414a93ac41f26cfd54a991.1669608950.git.lukas@wunner.de/ [2]: https://docs.amd.com/v/u/en-US/58271_PUB_SEV-TIO Chapter 5.1