From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=192.198.163.11 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1792999177; b=XyeZ9bwoN5NMj5gfVwYt9T/dUbdKkFFnKWsyWQMG3MrP53KPkfysAmEmitC8JIhnY0hL lf58vTRpBWIFBqe+jbBlFM3y+z03XT9fgTNaFBu2B+m+jiPR87NyZQj+aXplT5Onk5URr 9YTDCEM1lojCJa48nsNaqUH819UHLxWNO7D2pJnC6fm4YIbwKbMj6txWyZsDguZr8nCIK aRsPfb1rgZqkA3K38jEVIFjvHcpHf3LTiIi+f/L6NmC3638edqAbZGWfZIhDVfRhZxfj6 r/iARmyJsaXB9IZg+NQwJU9iKyYcoihzLBm1Hr1gWIydp+d9YdLKZER7P8+CbFQlTDQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792999177; 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:Message-ID:Date: MIME-Version:User-Agent:Subject:To:Cc:References:Content-Language: From:In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=QiScYf1oOOTAbSBP/oZKzosQ89SN8ry4cqm6yAv1xN8=; b=lWC19BdSxCvlOn7sIG/c/E7gAHq9+lppnZ6LwUAL9jCX1FB23Q/uy+ix0pvnZdoxkJ94 dYBaauojluKicUiC2UMzDsh31+Lg1ivYVCn//9Sz8vs9tvKGEvETzzAGA4YE/HvO1Zbz5 5FWAwEVM6dHZ7WXAiv+unqh8ok3db33DccNrbjCkGv81tZ05Bes8ZvePR9RBBlEvbh7K2 gQ747OXCeDkx2CTOkkfpNGxwELJDbl/+evCKxV0sv/mL279WFAW5I0TcWlSg36s07fxwl 6PozgzaVIAWrc719fLnnx/thG4vQajFUysGhPO8hDtyUqdgy+X1hktGfayxobw7ylGw== ARC-Authentication-Results: i=1; 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="ee/m4rOX"; arc=none smtp.remote-ip=192.198.163.11 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) (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 5692D606A31A for ; Mon, 26 Oct 2026 07:19:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 5692D606A31A 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, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=ee/m4rOX DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1792999175; x=1824535175; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=ujQcAXYXWxAkv9D2LRhj0xma3tY3kztKthVY/c35QeM=; b=ee/m4rOXNEpbdmabCym7jGVMVQuhXYZ+Cbamk5MRVKEOIawlSa/VcBkz /An2mRZhL0f3nHsBXg1Pt7E+5GTa3FlOSn7AexYojDlGI6xdypUWvVOIH oJQFUrrfbJ+f1JpHH4+lRB1U3p4MVlZYF+AThPb3SQGJU7AAJdwzKPvxg k2szAWyXKxIRrgShkCIykZ00OkC+QxGTGVwq48m/T69EF0C+EeBYNJCgb 3Dg/ryWIQK7P788BMKnTd4346Bupf46ENJ7a32AHz1DsGBeFWuH2d7iPo sP8CMnwArb3p/08ku64HJFQd6doTA9BuRMQoXMLmS5aF2FMK8sQLn8YuL Q==; X-CSE-ConnectionGUID: 2yYO5HyNTvCQvD6ZawvSWg== X-CSE-MsgGUID: DHCWhowFQ7eDvoXa7JG+pA== X-IronPort-AV: E=McAfee;i="6800,10657,11946"; a="1563671" X-IronPort-AV: E=Sophos;i="6.27,179,1787036400"; d="scan'208";a="1563671" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Oct 2026 00:19:33 -0700 X-CSE-ConnectionGUID: tAF+J0iMRtqtqCO3JYS3UQ== X-CSE-MsgGUID: dcI44Rx2QMehl1jCgTc4eQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,179,1787036400"; d="scan'208";a="4130639" Received: from unknown (HELO [10.238.0.97]) ([10.238.0.97]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Oct 2026 00:19:28 -0700 Message-ID: Date: Mon, 26 Oct 2026 15:19:25 +0800 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH 12/15] virt: tdx-guest: Support Trust Device Interface (TDI) activation To: Zhenzhong Duan , x86@kernel.org, linux-coco@lists.linux.dev, linux-kernel@vger.kernel.org Cc: dave.hansen@linux.intel.com, tglx@kernel.org, mingo@redhat.com, bp@alien8.de, hpa@zytor.com, dave.hansen@intel.com, kas@kernel.org, rick.p.edgecombe@intel.com, jgg@nvidia.com, nicolinc@nvidia.com, aik@amd.com, aneesh.kumar@kernel.org, seanjc@google.com, pbonzini@redhat.com, yilun.xu@linux.intel.com, chao.gao@intel.com, vishal.l.verma@intel.com, kevin.tian@intel.com, chao.p.peng@intel.com References: <20260924041032.1096569-1-zhenzhong.duan@intel.com> <20260924041032.1096569-13-zhenzhong.duan@intel.com> Content-Language: en-US From: Xiaoyao Li In-Reply-To: <20260924041032.1096569-13-zhenzhong.duan@intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 9/24/2026 12:10 PM, Zhenzhong Duan wrote: > Store the bind session ID obtained after binding the TDI which is used > by TDG.TDI.START to verify same bind session established by host before > activation. > > Add tdx_tdi_start_dev() to signal guest readiness to the TDX module and > issue the TDCM_OP_START_TDI hypercall for the host to complete activation. It mainly is stating what the code is doing. What matters more is the design choice. E.g., why the session ID needs to stored? will it be used anywhere else? can it be obtained just when calling the tdx_mcall_tdi_start()? Is there a hard requirement that before the MMIO is accepted, the DEVCIE cannot be started? Is it able to accept MMIO at runtime like the private memory? > The run callback accepts private MMIO ranges, starts the TDI, and verifies > that it reaches TDI_STATE_RUN, finally notifies DMA sub-system device's > ready to DMA to private memory. Note that private DMA is enabled separately > during driver attach by accepting the default DMAR entry. But this patch already calls dma_set_cc_private(). Will it cause problem without the following patch? If so, it has bisect issue.