From: kernel test robot <lkp@intel.com>
To: Kai Huang <kai.huang@intel.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH v2 4/5] x86/virt/tdx: Remove the !KEXEC_CORE dependency
Date: Sun, 11 May 2025 07:43:43 +0800 [thread overview]
Message-ID: <202505110749.3WJFCO0R-lkp@intel.com> (raw)
In-Reply-To: <0c0d9d250a7961e4aca325f970e73e204d650ad9.1746874095.git.kai.huang@intel.com>
Hi Kai,
kernel test robot noticed the following build errors:
[auto build test ERROR on 5b036d3516a8be54c24c05d8d1dc86f9815ba53e]
url: https://github.com/intel-lab-lkp/linux/commits/Kai-Huang/x86-sme-Use-percpu-boolean-to-control-wbinvd-during-kexec/20250510-192315
base: 5b036d3516a8be54c24c05d8d1dc86f9815ba53e
patch link: https://lore.kernel.org/r/0c0d9d250a7961e4aca325f970e73e204d650ad9.1746874095.git.kai.huang%40intel.com
patch subject: [PATCH v2 4/5] x86/virt/tdx: Remove the !KEXEC_CORE dependency
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20250511/202505110749.3WJFCO0R-lkp@intel.com/config)
compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250511/202505110749.3WJFCO0R-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/202505110749.3WJFCO0R-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from arch/x86/coco/tdx/debug.c:8:
>> arch/x86/include/asm/tdx.h:109:2: error: call to undeclared function 'preempt_disable'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
109 | preempt_disable();
| ^
>> arch/x86/include/asm/tdx.h:127:2: error: call to undeclared function 'preempt_enable'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
127 | preempt_enable();
| ^
2 errors generated.
vim +/preempt_disable +109 arch/x86/include/asm/tdx.h
1e66a7e27539305 Kai Huang 2023-12-08 103
448631f05539246 Kai Huang 2025-05-10 104 static inline u64 do_seamcall(sc_func_t func, u64 fn,
448631f05539246 Kai Huang 2025-05-10 105 struct tdx_module_args *args)
448631f05539246 Kai Huang 2025-05-10 106 {
448631f05539246 Kai Huang 2025-05-10 107 u64 ret;
448631f05539246 Kai Huang 2025-05-10 108
448631f05539246 Kai Huang 2025-05-10 @109 preempt_disable();
448631f05539246 Kai Huang 2025-05-10 110
448631f05539246 Kai Huang 2025-05-10 111 /*
448631f05539246 Kai Huang 2025-05-10 112 * SEAMCALLs are made to the TDX module and can generate dirty
448631f05539246 Kai Huang 2025-05-10 113 * cachelines of TDX private memory. Mark cache state incoherent
448631f05539246 Kai Huang 2025-05-10 114 * so that the cache can be flushed during kexec.
448631f05539246 Kai Huang 2025-05-10 115 *
448631f05539246 Kai Huang 2025-05-10 116 * Not all SEAMCALL leaf functions generate dirty cachelines
448631f05539246 Kai Huang 2025-05-10 117 * but for simplicity just treat all of them do.
448631f05539246 Kai Huang 2025-05-10 118 *
448631f05539246 Kai Huang 2025-05-10 119 * This needs to be done before actually making the SEAMCALL,
448631f05539246 Kai Huang 2025-05-10 120 * because kexec-ing CPU could send NMI to stop remote CPUs,
448631f05539246 Kai Huang 2025-05-10 121 * in which case even disabling IRQ won't help here.
448631f05539246 Kai Huang 2025-05-10 122 */
448631f05539246 Kai Huang 2025-05-10 123 this_cpu_write(cache_state_incoherent, true);
448631f05539246 Kai Huang 2025-05-10 124
448631f05539246 Kai Huang 2025-05-10 125 ret = func(fn, args);
448631f05539246 Kai Huang 2025-05-10 126
448631f05539246 Kai Huang 2025-05-10 @127 preempt_enable();
448631f05539246 Kai Huang 2025-05-10 128
448631f05539246 Kai Huang 2025-05-10 129 return ret;
448631f05539246 Kai Huang 2025-05-10 130 }
448631f05539246 Kai Huang 2025-05-10 131
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
parent reply other threads:[~2025-05-10 23:44 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <0c0d9d250a7961e4aca325f970e73e204d650ad9.1746874095.git.kai.huang@intel.com>]
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=202505110749.3WJFCO0R-lkp@intel.com \
--to=lkp@intel.com \
--cc=kai.huang@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