* [kvm:kvm-coco-queue 39/125] WARNING: modpost: vmlinux: section mismatch in reference: vt_init+0x2f (section: .init.text) -> vmx_exit (section: .exit.text)
@ 2025-01-23 4:54 kernel test robot
2025-01-23 8:35 ` Huang, Kai
0 siblings, 1 reply; 4+ messages in thread
From: kernel test robot @ 2025-01-23 4:54 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: llvm, oe-kbuild-all, kvm, Farrah Chen, Kai Huang
tree: https://git.kernel.org/pub/scm/virt/kvm/kvm.git kvm-coco-queue
head: 46bf7963a06a56a6c411329d06642836450d19a7
commit: 45c7c4a6fbf00d0ca3f033f30c39e6c12c517381 [39/125] KVM: VMX: Refactor VMX module init/exit functions
config: i386-buildonly-randconfig-002-20250123 (https://download.01.org/0day-ci/archive/20250123/202501231202.viiY8Abl-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250123/202501231202.viiY8Abl-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/202501231202.viiY8Abl-lkp@intel.com/
All warnings (new ones prefixed by >>, old ones prefixed by <<):
>> WARNING: modpost: vmlinux: section mismatch in reference: vt_init+0x2f (section: .init.text) -> vmx_exit (section: .exit.text)
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 4+ messages in thread* RE: [kvm:kvm-coco-queue 39/125] WARNING: modpost: vmlinux: section mismatch in reference: vt_init+0x2f (section: .init.text) -> vmx_exit (section: .exit.text) 2025-01-23 4:54 [kvm:kvm-coco-queue 39/125] WARNING: modpost: vmlinux: section mismatch in reference: vt_init+0x2f (section: .init.text) -> vmx_exit (section: .exit.text) kernel test robot @ 2025-01-23 8:35 ` Huang, Kai 2025-01-23 22:54 ` Edgecombe, Rick P 0 siblings, 1 reply; 4+ messages in thread From: Huang, Kai @ 2025-01-23 8:35 UTC (permalink / raw) To: lkp, Paolo Bonzini Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, kvm@vger.kernel.org, Chen, Farrah > tree: https://git.kernel.org/pub/scm/virt/kvm/kvm.git kvm-coco-queue > head: 46bf7963a06a56a6c411329d06642836450d19a7 > commit: 45c7c4a6fbf00d0ca3f033f30c39e6c12c517381 [39/125] KVM: VMX: > Refactor VMX module init/exit functions > config: i386-buildonly-randconfig-002-20250123 > (https://download.01.org/0day-ci/archive/20250123/202501231202.viiY8Abl- > lkp@intel.com/config) > compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project > ab51eccf88f5321e7c60591c5546b254b6afab99) > reproduce (this is a W=1 build): (https://download.01.org/0day- > ci/archive/20250123/202501231202.viiY8Abl-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/202501231202.viiY8Abl-lkp@intel. > | com/ > > All warnings (new ones prefixed by >>, old ones prefixed by <<): > > >> WARNING: modpost: vmlinux: section mismatch in reference: > >> vt_init+0x2f (section: .init.text) -> vmx_exit (section: .exit.text) > I checked the code, I think it is because vt_init() calls vmx_exit() in the error path when kvm_init() fails. vt_init() is annotated with __init and vmx_exit() is annotated with __exit. Perhaps we need to remove the __exit annotation from vmx_exit(). However I will be on airplane soon so cannot actually work on the code to verify. Will do it once have time. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [kvm:kvm-coco-queue 39/125] WARNING: modpost: vmlinux: section mismatch in reference: vt_init+0x2f (section: .init.text) -> vmx_exit (section: .exit.text) 2025-01-23 8:35 ` Huang, Kai @ 2025-01-23 22:54 ` Edgecombe, Rick P 2025-02-06 21:30 ` Huang, Kai 0 siblings, 1 reply; 4+ messages in thread From: Edgecombe, Rick P @ 2025-01-23 22:54 UTC (permalink / raw) To: pbonzini@redhat.com, Huang, Kai, lkp Cc: kvm@vger.kernel.org, llvm@lists.linux.dev, Chen, Farrah, oe-kbuild-all@lists.linux.dev On Thu, 2025-01-23 at 08:35 +0000, Huang, Kai wrote: > I checked the code, I think it is because vt_init() calls vmx_exit() in the error path when kvm_init() fails. > > vt_init() is annotated with __init and vmx_exit() is annotated with __exit. Yea. The __exit was just added recently: https://lore.kernel.org/kvm/20250102154050.2403-1-costas.argyris@amd.com/ > > Perhaps we need to remove the __exit annotation from vmx_exit(). > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [kvm:kvm-coco-queue 39/125] WARNING: modpost: vmlinux: section mismatch in reference: vt_init+0x2f (section: .init.text) -> vmx_exit (section: .exit.text) 2025-01-23 22:54 ` Edgecombe, Rick P @ 2025-02-06 21:30 ` Huang, Kai 0 siblings, 0 replies; 4+ messages in thread From: Huang, Kai @ 2025-02-06 21:30 UTC (permalink / raw) To: Edgecombe, Rick P, pbonzini@redhat.com, lkp Cc: kvm@vger.kernel.org, llvm@lists.linux.dev, Chen, Farrah, oe-kbuild-all@lists.linux.dev On 24/01/2025 11:54 am, Edgecombe, Rick P wrote: > On Thu, 2025-01-23 at 08:35 +0000, Huang, Kai wrote: >> I checked the code, I think it is because vt_init() calls vmx_exit() in the error path when kvm_init() fails. >> >> vt_init() is annotated with __init and vmx_exit() is annotated with __exit. > > Yea. The __exit was just added recently: > https://lore.kernel.org/kvm/20250102154050.2403-1-costas.argyris@amd.com/ Yeah the __exit was added (back) because vmx_exit() is no longer called in the __init path. Now with vt_init() for TDX, vmx_exit() is called by vt_init() again in the error handling path. I think we should just drop the __exit again in this patch. I tried below code change and the warning disappeared: diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c index 58915395da8a..9ab3507248c6 100644 --- a/arch/x86/kvm/vmx/vmx.c +++ b/arch/x86/kvm/vmx/vmx.c @@ -8586,7 +8586,7 @@ __init int vmx_hardware_setup(void) return r; } -static void __exit vmx_cleanup_l1d_flush(void) +static void vmx_cleanup_l1d_flush(void) { if (vmx_l1d_flush_pages) { free_pages((unsigned long)vmx_l1d_flush_pages, L1D_CACHE_ORDER); @@ -8596,7 +8596,7 @@ static void __exit vmx_cleanup_l1d_flush(void) l1tf_vmx_mitigation = VMENTER_L1D_FLUSH_AUTO; } -void __exit vmx_exit(void) +void vmx_exit(void) { allow_smaller_maxphyaddr = false; ^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-02-06 21:30 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-01-23 4:54 [kvm:kvm-coco-queue 39/125] WARNING: modpost: vmlinux: section mismatch in reference: vt_init+0x2f (section: .init.text) -> vmx_exit (section: .exit.text) kernel test robot 2025-01-23 8:35 ` Huang, Kai 2025-01-23 22:54 ` Edgecombe, Rick P 2025-02-06 21:30 ` Huang, Kai
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox