All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Baolu Lu <baolu.lu@linux.intel.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [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'
Date: Thu, 02 Jul 2026 05:34:08 +0800	[thread overview]
Message-ID: <202607020528.nVBZAle1-lkp@intel.com> (raw)

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

                 reply	other threads:[~2026-07-01 21:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202607020528.nVBZAle1-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=baolu.lu@linux.intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.