All of lore.kernel.org
 help / color / mirror / Atom feed
* [xinli-intel-fred-public:intel-lkp 20/21] arch/x86/kvm/vmx/tdx.c:779:33: error: call to undeclared function 'read_msr'; ISO C99 and later do not support implicit function declarations
@ 2025-06-25  7:00 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-06-25  7:00 UTC (permalink / raw)
  To: Xin3 Li; +Cc: oe-kbuild-all

tree:   https://github.com/xinli-intel/linux-fred-public.git intel-lkp
head:   f5a7aa46f2de853090449e1a5bb733628907c08b
commit: 4c8b4516efd0095821b118c1d1beaa3fd32d6dbe [20/21] KVM: VMX: Remove read_msr() defined in <asm/kvm_host.h>
config: x86_64-buildonly-randconfig-006-20250625 (https://download.01.org/0day-ci/archive/20250625/202506251414.ubuFeMUa-lkp@intel.com/config)
compiler: clang version 20.1.7 (https://github.com/llvm/llvm-project 6146a88f60492b520a36f8f8f3231e15f3cc6082)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250625/202506251414.ubuFeMUa-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/202506251414.ubuFeMUa-lkp@intel.com/

All errors (new ones prefixed by >>):

>> arch/x86/kvm/vmx/tdx.c:779:33: error: call to undeclared function 'read_msr'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     779 |                 vt->msr_host_kernel_gs_base = read_msr(MSR_KERNEL_GS_BASE);
         |                                               ^
   1 error generated.


vim +/read_msr +779 arch/x86/kvm/vmx/tdx.c

90cfe144c8ed98 Sean Christopherson 2025-02-22  764  
81bf40d54cd56e Isaku Yamahata      2025-01-29  765  /*
81bf40d54cd56e Isaku Yamahata      2025-01-29  766   * Compared to vmx_prepare_switch_to_guest(), there is not much to do
81bf40d54cd56e Isaku Yamahata      2025-01-29  767   * as SEAMCALL/SEAMRET calls take care of most of save and restore.
81bf40d54cd56e Isaku Yamahata      2025-01-29  768   */
81bf40d54cd56e Isaku Yamahata      2025-01-29  769  void tdx_prepare_switch_to_guest(struct kvm_vcpu *vcpu)
81bf40d54cd56e Isaku Yamahata      2025-01-29  770  {
81bf40d54cd56e Isaku Yamahata      2025-01-29  771  	struct vcpu_vt *vt = to_vt(vcpu);
81bf40d54cd56e Isaku Yamahata      2025-01-29  772  
81bf40d54cd56e Isaku Yamahata      2025-01-29  773  	if (vt->guest_state_loaded)
81bf40d54cd56e Isaku Yamahata      2025-01-29  774  		return;
81bf40d54cd56e Isaku Yamahata      2025-01-29  775  
81bf40d54cd56e Isaku Yamahata      2025-01-29  776  	if (likely(is_64bit_mm(current->mm)))
81bf40d54cd56e Isaku Yamahata      2025-01-29  777  		vt->msr_host_kernel_gs_base = current->thread.gsbase;
81bf40d54cd56e Isaku Yamahata      2025-01-29  778  	else
81bf40d54cd56e Isaku Yamahata      2025-01-29 @779  		vt->msr_host_kernel_gs_base = read_msr(MSR_KERNEL_GS_BASE);
81bf40d54cd56e Isaku Yamahata      2025-01-29  780  
8af099037527c5 Adrian Hunter       2025-01-29  781  	vt->host_debugctlmsr = get_debugctlmsr();
8af099037527c5 Adrian Hunter       2025-01-29  782  
81bf40d54cd56e Isaku Yamahata      2025-01-29  783  	vt->guest_state_loaded = true;
81bf40d54cd56e Isaku Yamahata      2025-01-29  784  }
81bf40d54cd56e Isaku Yamahata      2025-01-29  785  

:::::: The code at line 779 was first introduced by commit
:::::: 81bf40d54cd56e33b4cd381cc719efaa53832468 KVM: TDX: vcpu_run: save/restore host state(host kernel gs)

:::::: TO: Isaku Yamahata <isaku.yamahata@intel.com>
:::::: CC: Paolo Bonzini <pbonzini@redhat.com>

-- 
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:[~2025-06-25  7:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-25  7:00 [xinli-intel-fred-public:intel-lkp 20/21] arch/x86/kvm/vmx/tdx.c:779:33: error: call to undeclared function 'read_msr'; ISO C99 and later do not support implicit function declarations 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.