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 DF45331065B for ; Thu, 5 Mar 2026 09:25:03 +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=1772702705; cv=none; b=d1RGfOb/NJMKUvE+gzRs5pMX3m3He4JWTk2Y/P9GJkvSM13ss809JHyHrrirrQmx8Wf7vcZzMT8eU90ouoaOxV0Hpx+IO8X9kA/yb0MSwgl1GLobKFz2G3pih9/QvheMSwDvYHLdZrvat00x5OMblIIj3M8B6Tfspn80j6AJss0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772702705; c=relaxed/simple; bh=i7xx5fCE1pXU3hn232oNCbEw2z88WqGprgpNgwMewlA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=CazMMFEzCPmadIjKq9OjPaITlnNRrk9izqeln0dn/dYrK8PjYULdXgAb93XcVh3dt0oX9hl6fOpu7uSS+cug++yZfLZcJ6onJx3C4I3vM5YRB3yV8ajh6JmDCw102TdJQ5poJlaOxvA+7EQ394QddO0vsiS0Ca4YGOEhowz6jOs= 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=gDQp1cpH; 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="gDQp1cpH" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1772702704; x=1804238704; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=i7xx5fCE1pXU3hn232oNCbEw2z88WqGprgpNgwMewlA=; b=gDQp1cpHSMRVb7bNYAt3/a5NPiSjPVweVe+elMlwldKFpy6Lgxf0XOzd M4Gm/mHx98t6NcM5jq8Q3pP2Lw6yl2ZhAmBomJqFLwt+WL88pPuQvsdBX Gl4Dh6VwFPrLQCEncGS70Qi7ZKMWRhdYSjAdyP/kMFC45RquEZAJpUHU8 eFp3eTu4HSUYmiIEKxPMyBPHktXW+ZoVXKLOlYJ4hQekSz3XlfE1k+sCm UBqhuTYOyJpT4wmW9Ng9zpMN8jphhzXo3Ij6nWvPL4K2W5crZ+BEIf5xz Hpm6m6IAjvJz7wrvTMR35iCaM72I6gSDiUd2kSvrilzKiV5CinbfTyOsp A==; X-CSE-ConnectionGUID: jlRV4ySZQ3mu2HqHMkOszA== X-CSE-MsgGUID: 8M0rWP3KRr6KLf0+5nMdYQ== X-IronPort-AV: E=McAfee;i="6800,10657,11719"; a="61356594" X-IronPort-AV: E=Sophos;i="6.23,102,1770624000"; d="scan'208";a="61356594" 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:24:47 -0800 X-CSE-ConnectionGUID: ZkbojYpZR2WP7PSbA3ShnQ== X-CSE-MsgGUID: bQgJFqcLTXGbymInrDl0hw== 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:24:42 -0800 Message-ID: <7fbbea65-597b-4158-ac86-5dd3b7af067b@linux.intel.com> Date: Thu, 5 Mar 2026 17:24:40 +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 01/24] x86/virt/tdx: Move low level SEAMCALL helpers out of 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, Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" References: <20260212143606.534586-1-chao.gao@intel.com> <20260212143606.534586-2-chao.gao@intel.com> Content-Language: en-US From: Binbin Wu In-Reply-To: <20260212143606.534586-2-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: > From: Kai Huang > > TDX host core code implements three seamcall*() helpers to make SEAMCALL > to the TDX module. Currently, they are implemented in and > are exposed to other kernel code which includes . > > However, other than the TDX host core, seamcall*() are not expected to > be used by other kernel code directly. For instance, for all SEAMCALLs > that are used by KVM, the TDX host core exports a wrapper function for > each of them. > > Move seamcall*() and related code out of and make them only > visible to TDX host core. > > Since TDX host core tdx.c is already very heavy, don't put low level > seamcall*() code there but to a new dedicated "seamcall.h". Also, Nit: seamcall.h is now seamcall_internal.h in this version. > currently tdx.c has seamcall_prerr*() helpers which additionally print > error message when calling seamcall*() fails. Move them to "seamcall.h" Ditto. > as well. In such way all low level SEAMCALL helpers are in a dedicated > place, which is much more readable. [...]