All of lore.kernel.org
 help / color / mirror / Atom feed
* [lubaolu-intel-iommu:iommu/tdxc/enablement-alpha-v4 11/13] drivers/iommu/intel/tdxc.c:135:13: error: implicit declaration of function 'tdh_iommu_clear'
@ 2026-07-01 21:34 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-07-01 21:34 UTC (permalink / raw)
  To: Baolu Lu; +Cc: oe-kbuild-all

tree:   https://github.com/LuBaolu/intel-iommu.git iommu/tdxc/enablement-alpha-v4
head:   b15da1ab69a5dd93c876d0998dd5a7bfd93efa8f
commit: e1e6373a563efdd8fc62cc372fa7147243167eca [11/13] iommu/vt-d: Add support to setup/teardown TDX extensions
config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20260702/202607020528.nVBZAle1-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260702/202607020528.nVBZAle1-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202607020528.nVBZAle1-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/iommu/intel/tdxc.c: In function 'iommu_tdx_clear_one':
>> drivers/iommu/intel/tdxc.c:135:13: error: implicit declaration of function 'tdh_iommu_clear' [-Wimplicit-function-declaration]
     135 |         r = tdh_iommu_clear(iommu->tdx_iommu_id, iommu->mt_pages->root);
         |             ^~~~~~~~~~~~~~~
   drivers/iommu/intel/tdxc.c: In function 'intel_iommu_bringup_tdxc':
>> drivers/iommu/intel/tdxc.c:165:13: error: implicit declaration of function 'tdh_iommu_setup' [-Wimplicit-function-declaration]
     165 |         r = tdh_iommu_setup(drhd->reg_base_addr, iommu_mt->root, &tdx_iommu_id);
         |             ^~~~~~~~~~~~~~~


vim +/tdh_iommu_clear +135 drivers/iommu/intel/tdxc.c

   127	
   128	static void iommu_tdx_clear_one(struct intel_iommu *iommu)
   129	{
   130		u64 r;
   131	
   132		if (!iommu->tdx_iommu_id)
   133			return;
   134	
 > 135		r = tdh_iommu_clear(iommu->tdx_iommu_id, iommu->mt_pages->root);
   136		if (r) {
   137			pr_err("%s: Fail to disable trusted DMA for TEE, error 0x%llx\n",
   138			       iommu->name, r);
   139			return;
   140		}
   141	
   142		free_mt_pages(iommu->mt_pages);
   143		iommu->mt_pages = NULL;
   144		iommu->tdx_iommu_id = 0;
   145	}
   146	
   147	static int intel_iommu_bringup_tdxc(struct intel_iommu *iommu, unsigned int nr_pages)
   148	{
   149		struct dmar_drhd_unit *drhd = iommu->drhd;
   150		struct tdxc_pages *iommu_mt;
   151		u64 r, tdx_iommu_id;
   152		int ret = 0;
   153	
   154		/*
   155		 * Nothing to do if the iommu doesn't support TDX extension or the
   156		 * DMA translation has not been enabled.
   157		 */
   158		if (!ecap_tdxc(iommu->ecap) || !(iommu->gcmd & DMA_GCMD_TE))
   159			return 0;
   160	
   161		iommu_mt = tdxc_alloc_mt_pages(iommu, nr_pages);
   162		if (!iommu_mt)
   163			return -ENOMEM;
   164	
 > 165		r = tdh_iommu_setup(drhd->reg_base_addr, iommu_mt->root, &tdx_iommu_id);
   166		/* TDX Extension is not supported on this iommu. Nothing to do. */
   167		if ((r & TDX_SEAMCALL_STATUS_MASK)  == TDX_OPERAND_INVALID)
   168			goto free_mt_pages;
   169	        if (r) {
   170	                pr_err("%s: Failed to initialize trusted DMA for TEE, error 0x%llx\n",
   171			       iommu->name, r);
   172	                ret = -EFAULT;
   173			goto free_mt_pages;
   174	        }
   175	
   176		iommu->tdx_iommu_id = tdx_iommu_id;
   177		iommu->mt_pages = iommu_mt;
   178	
   179		return -EOPNOTSUPP;
   180	free_mt_pages:
   181		free_mt_pages(iommu_mt);
   182		return ret;
   183	}
   184	

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-01 21:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-01 21:34 [lubaolu-intel-iommu:iommu/tdxc/enablement-alpha-v4 11/13] drivers/iommu/intel/tdxc.c:135:13: error: implicit declaration of function 'tdh_iommu_clear' kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.