From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16]) (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 EEA10378D71 for ; Thu, 5 Mar 2026 09:25:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772702754; cv=none; b=LbQU29Y914giLuqtwbx9/tXdIeUtzdHbp+bHbPC+F98H/Uxjj4oO73GyDCaS4jQKcjN6GYshL23pa8eu/q9tXh3zvzceMeRWsrWkIjo5D11E/YuLU0biG294ttIIvX5L+9eJgmrQtfEkrOzLmiw5uuOcVLLZvc7lMhSsSu5BhOE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772702754; c=relaxed/simple; bh=RewwuBMyHSoanSb1wPB65peRwv/naRzYe7csL5PLp2g=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=oWE5g9y8kmrMTFbVaG4mp9E2dO5jeFNSB8Z8up3+1IQTIin/0CMal9BYDfTbD5E0PiLBS5JELwvUbr4AJQh3yVz07LMXp7SXNwluRUjY2Ofob5ZttGBfpqpM3ci5nwHNg3TeHwRXprVcy/7mqPRhU1+oqh/EpJYi5ikSBtPqduY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=DIpp2n5T; arc=none smtp.client-ip=192.198.163.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="DIpp2n5T" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1772702752; x=1804238752; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=RewwuBMyHSoanSb1wPB65peRwv/naRzYe7csL5PLp2g=; b=DIpp2n5TLnbY9mteC3EQCYp3VgzaWySztbLZK82nlh64pVcxtWcKjMzQ ZJo+m1w8+buPVZI+ojCaG7KBSWu+/94akuJOeNJf6Ydsf0GjlI9sneguU EZ6uBWb11eXZE1eFtc97cm2PXf4OWzFPZzlY5JzbRx+rUdJQQfiHqoAzL ywybM/1FWM3epyKaGpyC4yK3TpQqg0MCG7ClTz2pHdBkiDJXccoUUyb5X drkcRkBMl+hkqzRNkoMKPdyu3xgd+PvtNNgcN4gTRQheFYuj9DaOyOO4E SG6P6EbNhNGSuMrBdv3qd0Cj48r8k0+PtEgq1zr3rt4f7itMIT292plvv w==; X-CSE-ConnectionGUID: HNwIwF3IQeq1hd01lgVLUg== X-CSE-MsgGUID: JKCqGR9uSiG4v9rzHDJUvg== X-IronPort-AV: E=McAfee;i="6800,10657,11719"; a="61356783" X-IronPort-AV: E=Sophos;i="6.23,102,1770624000"; d="scan'208";a="61356783" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa110.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Mar 2026 01:25:51 -0800 X-CSE-ConnectionGUID: Wb1x7m8KSICcQk8+XuBnmQ== X-CSE-MsgGUID: Se73oGxgSgGnDHb2Yb/uaA== X-ExtLoop1: 1 Received: from unknown (HELO [10.238.1.83]) ([10.238.1.83]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Mar 2026 01:25:45 -0800 Message-ID: <1be33429-25ee-4e99-b795-18f77f6cbc34@linux.intel.com> Date: Thu, 5 Mar 2026 17:25:43 +0800 Precedence: bulk X-Mailing-List: linux-coco@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 02/24] coco/tdx-host: Introduce a "tdx_host" device To: Chao Gao Cc: linux-coco@lists.linux.dev, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, x86@kernel.org, reinette.chatre@intel.com, ira.weiny@intel.com, kai.huang@intel.com, dan.j.williams@intel.com, yilun.xu@linux.intel.com, sagis@google.com, vannapurve@google.com, paulmck@kernel.org, nik.borisov@suse.com, zhenzhong.duan@intel.com, seanjc@google.com, rick.p.edgecombe@intel.com, kas@kernel.org, dave.hansen@linux.intel.com, vishal.l.verma@intel.com, tony.lindgren@linux.intel.com, Jonathan Cameron , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" References: <20260212143606.534586-1-chao.gao@intel.com> <20260212143606.534586-3-chao.gao@intel.com> Content-Language: en-US From: Binbin Wu In-Reply-To: <20260212143606.534586-3-chao.gao@intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 2/12/2026 10:35 PM, Chao Gao wrote: > TDX depends on a platform firmware module that is invoked via instructions > similar to vmenter (i.e. enter into a new privileged "root-mode" context to > manage private memory and private device mechanisms). It is a software > construct that depends on the CPU vmxon state to enable invocation of > TDX-module ABIs. Unlike other Trusted Execution Environment (TEE) platform> implementations that employ a firmware module running on a PCI device with > an MMIO mailbox for communication, TDX has no hardware device to point to > as the TEE Secure Manager (TSM). > > Create a virtual device not only to align with other implementations but > also to make it easier to > > - expose metadata (e.g., TDX module version, seamldr version etc) to > the userspace as device attributes > > - implement firmware uploader APIs which are tied to a device. This is > needed to support TDX module runtime updates > > - enable TDX Connect which will share a common infrastructure with other > platform implementations. In the TDX Connect context, every > architecture has a TSM, represented by a PCIe or virtual device. The > new "tdx_host" device will serve the TSM role. > > A faux device is used as for TDX because the TDX module is singular within > the system and lacks associated platform resources. Using a faux device > eliminates the need to create a stub bus. > > The call to tdx_get_sysinfo() ensures that the TDX Module is ready to Nit: There are "TDX module", "TDX-module" and "TDX Module" in the cover letter. Better to align the style. > provide services. > [...] > diff --git a/drivers/virt/coco/tdx-host/Kconfig b/drivers/virt/coco/tdx-host/Kconfig > new file mode 100644 > index 000000000000..e58bad148a35 > --- /dev/null > +++ b/drivers/virt/coco/tdx-host/Kconfig > @@ -0,0 +1,10 @@ > +config TDX_HOST_SERVICES > + tristate "TDX Host Services Driver" > + depends on INTEL_TDX_HOST > + default m > + help > + Enable access to TDX host services like module update and > + extensions (e.g. TDX Connect). > + > + Say y or m if enabling support for confidential virtual machine > + support (CONFIG_INTEL_TDX_HOST). Nit: A slight repetition: support for ... support. Reviewed-by: Binbin Wu > The module is called tdx_host.ko [...]