Messages in this thread | | | Date | Sat, 18 Dec 2021 21:13:12 +0800 | From | kernel test robot <> | Subject | [intel-tdx:kvm-upstream 130/152] arch/x86/kvm/vmx/tdx_stubs.c:39:6: error: redefinition of 'tdx_get_exit_info' |
| |
tree: https://github.com/intel/tdx.git kvm-upstream head: bdfe06c17daab60c196ff80c1d98467a1d3734fa commit: 1e0deafa174c1fe4fc88f708c20e1e0b592bc77d [130/152] KVM: TDX: Add methods to ignore accesses to CPU state config: x86_64-randconfig-a013-20211216 (https://download.01.org/0day-ci/archive/20211218/202112182135.CvRmQggM-lkp@intel.com/config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project dd245bab9fbb364faa1581e4f92ba3119a872fba) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/intel/tdx/commit/1e0deafa174c1fe4fc88f708c20e1e0b592bc77d git remote add intel-tdx https://github.com/intel/tdx.git git fetch --no-tags intel-tdx kvm-upstream git checkout 1e0deafa174c1fe4fc88f708c20e1e0b592bc77d # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
^ static arch/x86/kvm/vmx/tdx_stubs.c:20:6: warning: no previous prototype for function 'tdx_set_virtual_apic_mode' [-Wmissing-prototypes] void tdx_set_virtual_apic_mode(struct kvm_vcpu *vcpu) {} ^ arch/x86/kvm/vmx/tdx_stubs.c:20:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void tdx_set_virtual_apic_mode(struct kvm_vcpu *vcpu) {} ^ static arch/x86/kvm/vmx/tdx_stubs.c:22:6: warning: no previous prototype for function 'tdx_get_exit_info' [-Wmissing-prototypes] void tdx_get_exit_info(struct kvm_vcpu *vcpu, u32 *reason, u64 *info1, ^ arch/x86/kvm/vmx/tdx_stubs.c:22:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void tdx_get_exit_info(struct kvm_vcpu *vcpu, u32 *reason, u64 *info1, ^ static arch/x86/kvm/vmx/tdx_stubs.c:25:6: warning: no previous prototype for function 'tdx_prepare_switch_to_guest' [-Wmissing-prototypes] void tdx_prepare_switch_to_guest(struct kvm_vcpu *vcpu) {} ^ arch/x86/kvm/vmx/tdx_stubs.c:25:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void tdx_prepare_switch_to_guest(struct kvm_vcpu *vcpu) {} ^ static arch/x86/kvm/vmx/tdx_stubs.c:26:6: warning: no previous prototype for function 'tdx_handle_exit_irqoff' [-Wmissing-prototypes] void tdx_handle_exit_irqoff(struct kvm_vcpu *vcpu) {} ^ arch/x86/kvm/vmx/tdx_stubs.c:26:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void tdx_handle_exit_irqoff(struct kvm_vcpu *vcpu) {} ^ static arch/x86/kvm/vmx/tdx_stubs.c:27:5: warning: no previous prototype for function 'tdx_handle_exit' [-Wmissing-prototypes] int tdx_handle_exit(struct kvm_vcpu *vcpu, ^ arch/x86/kvm/vmx/tdx_stubs.c:27:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int tdx_handle_exit(struct kvm_vcpu *vcpu, ^ static arch/x86/kvm/vmx/tdx_stubs.c:29:5: warning: no previous prototype for function 'tdx_get_cpl' [-Wmissing-prototypes] int tdx_get_cpl(struct kvm_vcpu *vcpu) { return 0; } ^ arch/x86/kvm/vmx/tdx_stubs.c:29:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int tdx_get_cpl(struct kvm_vcpu *vcpu) { return 0; } ^ static arch/x86/kvm/vmx/tdx_stubs.c:30:15: warning: no previous prototype for function 'tdx_get_rflags' [-Wmissing-prototypes] unsigned long tdx_get_rflags(struct kvm_vcpu *vcpu) { return 0; } ^ arch/x86/kvm/vmx/tdx_stubs.c:30:1: note: declare 'static' if the function is not intended to be used outside of this translation unit unsigned long tdx_get_rflags(struct kvm_vcpu *vcpu) { return 0; } ^ static arch/x86/kvm/vmx/tdx_stubs.c:31:6: warning: no previous prototype for function 'tdx_is_emulated_msr' [-Wmissing-prototypes] bool tdx_is_emulated_msr(u32 index, bool write) { return false; } ^ arch/x86/kvm/vmx/tdx_stubs.c:31:1: note: declare 'static' if the function is not intended to be used outside of this translation unit bool tdx_is_emulated_msr(u32 index, bool write) { return false; } ^ static arch/x86/kvm/vmx/tdx_stubs.c:32:5: warning: no previous prototype for function 'tdx_get_msr' [-Wmissing-prototypes] int tdx_get_msr(struct kvm_vcpu *vcpu, struct msr_data *msr) { return 1; } ^ arch/x86/kvm/vmx/tdx_stubs.c:32:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int tdx_get_msr(struct kvm_vcpu *vcpu, struct msr_data *msr) { return 1; } ^ static arch/x86/kvm/vmx/tdx_stubs.c:33:5: warning: no previous prototype for function 'tdx_set_msr' [-Wmissing-prototypes] int tdx_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr) { return 1; } ^ arch/x86/kvm/vmx/tdx_stubs.c:33:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int tdx_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr) { return 1; } ^ static arch/x86/kvm/vmx/tdx_stubs.c:34:5: warning: no previous prototype for function 'tdx_get_segment_base' [-Wmissing-prototypes] u64 tdx_get_segment_base(struct kvm_vcpu *vcpu, int seg) { return 0; } ^ arch/x86/kvm/vmx/tdx_stubs.c:34:1: note: declare 'static' if the function is not intended to be used outside of this translation unit u64 tdx_get_segment_base(struct kvm_vcpu *vcpu, int seg) { return 0; } ^ static arch/x86/kvm/vmx/tdx_stubs.c:35:6: warning: no previous prototype for function 'tdx_get_segment' [-Wmissing-prototypes] void tdx_get_segment(struct kvm_vcpu *vcpu, struct kvm_segment *var, int seg) {} ^ arch/x86/kvm/vmx/tdx_stubs.c:35:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void tdx_get_segment(struct kvm_vcpu *vcpu, struct kvm_segment *var, int seg) {} ^ static arch/x86/kvm/vmx/tdx_stubs.c:37:6: warning: no previous prototype for function 'tdx_apicv_post_state_restore' [-Wmissing-prototypes] void tdx_apicv_post_state_restore(struct kvm_vcpu *vcpu) {} ^ arch/x86/kvm/vmx/tdx_stubs.c:37:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void tdx_apicv_post_state_restore(struct kvm_vcpu *vcpu) {} ^ static arch/x86/kvm/vmx/tdx_stubs.c:38:5: warning: no previous prototype for function 'tdx_deliver_posted_interrupt' [-Wmissing-prototypes] int tdx_deliver_posted_interrupt(struct kvm_vcpu *vcpu, int vector) { return 0; } ^ arch/x86/kvm/vmx/tdx_stubs.c:38:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int tdx_deliver_posted_interrupt(struct kvm_vcpu *vcpu, int vector) { return 0; } ^ static >> arch/x86/kvm/vmx/tdx_stubs.c:39:6: error: redefinition of 'tdx_get_exit_info' void tdx_get_exit_info(struct kvm_vcpu *vcpu, u32 *reason, ^ arch/x86/kvm/vmx/tdx_stubs.c:22:6: note: previous definition is here void tdx_get_exit_info(struct kvm_vcpu *vcpu, u32 *reason, u64 *info1, ^ arch/x86/kvm/vmx/tdx_stubs.c:41:5: warning: no previous prototype for function 'tdx_smi_allowed' [-Wmissing-prototypes] int tdx_smi_allowed(struct kvm_vcpu *vcpu, bool for_injection) { return false; } ^ arch/x86/kvm/vmx/tdx_stubs.c:41:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int tdx_smi_allowed(struct kvm_vcpu *vcpu, bool for_injection) { return false; } ^ static arch/x86/kvm/vmx/tdx_stubs.c:42:5: warning: no previous prototype for function 'tdx_enter_smm' [-Wmissing-prototypes] int tdx_enter_smm(struct kvm_vcpu *vcpu, char *smstate) { return 0; } ^ arch/x86/kvm/vmx/tdx_stubs.c:42:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int tdx_enter_smm(struct kvm_vcpu *vcpu, char *smstate) { return 0; } ^ static arch/x86/kvm/vmx/tdx_stubs.c:43:5: warning: no previous prototype for function 'tdx_leave_smm' [-Wmissing-prototypes] int tdx_leave_smm(struct kvm_vcpu *vcpu, const char *smstate) { return 0; } ^ arch/x86/kvm/vmx/tdx_stubs.c:43:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int tdx_leave_smm(struct kvm_vcpu *vcpu, const char *smstate) { return 0; } ^ static arch/x86/kvm/vmx/tdx_stubs.c:44:6: warning: no previous prototype for function 'tdx_enable_smi_window' [-Wmissing-prototypes] void tdx_enable_smi_window(struct kvm_vcpu *vcpu) {} ^ arch/x86/kvm/vmx/tdx_stubs.c:44:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void tdx_enable_smi_window(struct kvm_vcpu *vcpu) {} ^ static arch/x86/kvm/vmx/tdx_stubs.c:46:5: warning: no previous prototype for function 'tdx_dev_ioctl' [-Wmissing-prototypes] int tdx_dev_ioctl(void __user *argp) { return -EOPNOTSUPP; } ^ arch/x86/kvm/vmx/tdx_stubs.c:46:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int tdx_dev_ioctl(void __user *argp) { return -EOPNOTSUPP; } ^ static arch/x86/kvm/vmx/tdx_stubs.c:47:5: warning: no previous prototype for function 'tdx_vm_ioctl' [-Wmissing-prototypes] int tdx_vm_ioctl(struct kvm *kvm, void __user *argp) { return -EOPNOTSUPP; } ^ arch/x86/kvm/vmx/tdx_stubs.c:47:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int tdx_vm_ioctl(struct kvm *kvm, void __user *argp) { return -EOPNOTSUPP; } ^ static arch/x86/kvm/vmx/tdx_stubs.c:48:72: error: use of undeclared identifier 'ENOPNOTSUPP' int tdx_vcpu_ioctl(struct kvm_vcpu *vcpu, void __user *argp) { return -ENOPNOTSUPP; } ^ arch/x86/kvm/vmx/tdx_stubs.c:48:5: warning: no previous prototype for function 'tdx_vcpu_ioctl' [-Wmissing-prototypes] int tdx_vcpu_ioctl(struct kvm_vcpu *vcpu, void __user *argp) { return -ENOPNOTSUPP; } ^ arch/x86/kvm/vmx/tdx_stubs.c:48:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int tdx_vcpu_ioctl(struct kvm_vcpu *vcpu, void __user *argp) { return -ENOPNOTSUPP; } ^ static arch/x86/kvm/vmx/tdx_stubs.c:50:6: warning: no previous prototype for function 'tdx_flush_tlb' [-Wmissing-prototypes] void tdx_flush_tlb(struct kvm_vcpu *vcpu) {} ^ arch/x86/kvm/vmx/tdx_stubs.c:50:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void tdx_flush_tlb(struct kvm_vcpu *vcpu) {} ^ static arch/x86/kvm/vmx/tdx_stubs.c:51:6: warning: no previous prototype for function 'tdx_load_mmu_pgd' [-Wmissing-prototypes] void tdx_load_mmu_pgd(struct kvm_vcpu *vcpu, hpa_t root_hpa, int root_level) {} ^ arch/x86/kvm/vmx/tdx_stubs.c:51:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void tdx_load_mmu_pgd(struct kvm_vcpu *vcpu, hpa_t root_hpa, int root_level) {} ^ static 37 warnings and 2 errors generated.
vim +/tdx_get_exit_info +39 arch/x86/kvm/vmx/tdx_stubs.c
bd5ba6a8b26525 Isaku Yamahata 2021-12-14 36 dee2c199d79b20 Isaku Yamahata 2021-12-14 37 void tdx_apicv_post_state_restore(struct kvm_vcpu *vcpu) {} dee2c199d79b20 Isaku Yamahata 2021-12-14 38 int tdx_deliver_posted_interrupt(struct kvm_vcpu *vcpu, int vector) { return 0; } 23fe81f995e342 Isaku Yamahata 2021-12-14 @39 void tdx_get_exit_info(struct kvm_vcpu *vcpu, u32 *reason, 23fe81f995e342 Isaku Yamahata 2021-12-14 40 u64 *info1, u64 *info2, u32 *intr_info, u32 *error_code) {} 11f826bfb08f30 Isaku Yamahata 2021-12-08 41 int tdx_smi_allowed(struct kvm_vcpu *vcpu, bool for_injection) { return false; } 11f826bfb08f30 Isaku Yamahata 2021-12-08 42 int tdx_enter_smm(struct kvm_vcpu *vcpu, char *smstate) { return 0; } 11f826bfb08f30 Isaku Yamahata 2021-12-08 43 int tdx_leave_smm(struct kvm_vcpu *vcpu, const char *smstate) { return 0; } 11f826bfb08f30 Isaku Yamahata 2021-12-08 44 void tdx_enable_smi_window(struct kvm_vcpu *vcpu) {} dee2c199d79b20 Isaku Yamahata 2021-12-14 45
:::::: The code at line 39 was first introduced by commit :::::: 23fe81f995e342b4152daa56cad4105a72277d4f KVM: TDX: Add a place holder to handle TDX VM exit
:::::: TO: Isaku Yamahata <isaku.yamahata@intel.com> :::::: CC: Isaku Yamahata <isaku.yamahata@intel.com>
--- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
| |