Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [kas:tdx/dpamt 15/17] arch/x86/kvm/mmu/tdp_mmu.c:58:2: error: call to undeclared function 'tdx_free_pamt_pages'; ISO C99 and later do not support implicit function declarations
Date: Tue, 3 Jun 2025 19:42:42 +0800	[thread overview]
Message-ID: <202506031927.cjuKRC0i-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/kas/linux.git tdx/dpamt
head:   1fd1b5ba222a7b9084917c03e49601c2eb5906a0
commit: 4bec5bcd633b7c1bad86891caf0d5bc2c6745061 [15/17] split
config: x86_64-rhel-9.4-rust (https://download.01.org/0day-ci/archive/20250603/202506031927.cjuKRC0i-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
rustc: rustc 1.78.0 (9b00956e5 2024-04-29)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250603/202506031927.cjuKRC0i-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/202506031927.cjuKRC0i-lkp@intel.com/

All errors (new ones prefixed by >>):

>> arch/x86/kvm/mmu/tdp_mmu.c:58:2: error: call to undeclared function 'tdx_free_pamt_pages'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      58 |         tdx_free_pamt_pages(&sp->pamt_pages);
         |         ^
   arch/x86/kvm/mmu/tdp_mmu.c:58:2: note: did you mean 'tdx_nr_pamt_pages'?
   arch/x86/include/asm/tdx.h:214:19: note: 'tdx_nr_pamt_pages' declared here
     214 | static inline int tdx_nr_pamt_pages(const struct tdx_sys_info *sysinfo) { return 0; }
         |                   ^
>> arch/x86/kvm/mmu/tdp_mmu.c:58:27: error: no member named 'pamt_pages' in 'struct kvm_mmu_page'
      58 |         tdx_free_pamt_pages(&sp->pamt_pages);
         |                              ~~  ^
>> arch/x86/kvm/mmu/tdp_mmu.c:60:3: error: call to undeclared function 'tdx_free_page'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      60 |                 tdx_free_page(virt_to_page(sp->external_spt));
         |                 ^
   arch/x86/kvm/mmu/tdp_mmu.c:223:22: error: no member named 'pamt_pages' in 'struct kvm_mmu_page'
     223 |         INIT_LIST_HEAD(&sp->pamt_pages);
         |                         ~~  ^
   arch/x86/kvm/mmu/tdp_mmu.c:1629:22: error: no member named 'pamt_pages' in 'struct kvm_mmu_page'
    1629 |         INIT_LIST_HEAD(&sp->pamt_pages);
         |                         ~~  ^
>> arch/x86/kvm/mmu/tdp_mmu.c:1638:9: error: call to undeclared function 'tdx_alloc_page'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    1638 |         page = tdx_alloc_page();
         |                ^
>> arch/x86/kvm/mmu/tdp_mmu.c:1638:7: error: incompatible integer to pointer conversion assigning to 'struct page *' from 'int' [-Wint-conversion]
    1638 |         page = tdx_alloc_page();
         |              ^ ~~~~~~~~~~~~~~~~
>> arch/x86/kvm/mmu/tdp_mmu.c:1643:6: error: call to undeclared function 'tdx_alloc_pamt_pages'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    1643 |         if (tdx_alloc_pamt_pages(&sp->pamt_pages, NULL))
         |             ^
   arch/x86/kvm/mmu/tdp_mmu.c:1643:6: note: did you mean 'tdx_nr_pamt_pages'?
   arch/x86/include/asm/tdx.h:214:19: note: 'tdx_nr_pamt_pages' declared here
     214 | static inline int tdx_nr_pamt_pages(const struct tdx_sys_info *sysinfo) { return 0; }
         |                   ^
   arch/x86/kvm/mmu/tdp_mmu.c:1643:32: error: no member named 'pamt_pages' in 'struct kvm_mmu_page'
    1643 |         if (tdx_alloc_pamt_pages(&sp->pamt_pages, NULL))
         |                                   ~~  ^
   arch/x86/kvm/mmu/tdp_mmu.c:1649:3: error: call to undeclared function 'tdx_free_page'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    1649 |                 tdx_free_page(page);
         |                 ^
   10 errors generated.


vim +/tdx_free_pamt_pages +58 arch/x86/kvm/mmu/tdp_mmu.c

    55	
    56	static void tdp_mmu_free_sp(struct kvm_mmu_page *sp)
    57	{
  > 58		tdx_free_pamt_pages(&sp->pamt_pages);
    59		if (sp->external_spt)
  > 60			tdx_free_page(virt_to_page(sp->external_spt));
    61		free_page((unsigned long)sp->spt);
    62		kmem_cache_free(mmu_page_header_cache, sp);
    63	}
    64	

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

                 reply	other threads:[~2025-06-03 11:43 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=202506031927.cjuKRC0i-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=llvm@lists.linux.dev \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox