tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: d68dc6ee371ec5466be9b2d76bdca0b360940adc commit: 2ee1b090fed0f14944d85db83f5dbc33fbe812ec [1636/1636] LoongArch: KVM: Add PV steal time support in guest side config: loongarch-randconfig-002-20241213 (https://download.01.org/0day-ci/archive/20241213/202412132355.qfya7e74-lkp@i...) compiler: loongarch64-linux-gcc (GCC) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241213/202412132355.qfya7e74-lkp@i...)
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/202412132355.qfya7e74-lkp@intel.com/
All warnings (new ones prefixed by >>):
| ^~~~~~~~~~~~~ arch/loongarch/kernel/paravirt.c:81:1: note: in expansion of macro 'early_param' 81 | early_param("no-steal-acc", parse_no_stealacc); | ^~~~~~~~~~~ arch/loongarch/kernel/paravirt.c:111:12: error: redefinition of 'paravt_steal_clock' 111 | static u64 paravt_steal_clock(int cpu) | ^~~~~~~~~~~~~~~~~~ arch/loongarch/kernel/paravirt.c:83:12: note: previous definition of 'paravt_steal_clock' with type 'u64(int)' {aka 'long long unsigned int(int)'} 83 | static u64 paravt_steal_clock(int cpu) | ^~~~~~~~~~~~~~~~~~ arch/loongarch/kernel/paravirt.c: In function 'pv_send_ipi_single': arch/loongarch/kernel/paravirt.c:141:24: error: 'KVM_HCALL_FUNC_PV_IPI' undeclared (first use in this function); did you mean 'KVM_HCALL_FUNC_IPI'? 141 | kvm_hypercall3(KVM_HCALL_FUNC_PV_IPI, 1, 0, min); | ^~~~~~~~~~~~~~~~~~~~~ | KVM_HCALL_FUNC_IPI arch/loongarch/kernel/paravirt.c:141:24: note: each undeclared identifier is reported only once for each function it appears in arch/loongarch/kernel/paravirt.c: In function 'pv_send_ipi_mask': arch/loongarch/kernel/paravirt.c:175:40: error: 'KVM_HCALL_FUNC_PV_IPI' undeclared (first use in this function); did you mean 'KVM_HCALL_FUNC_IPI'? 175 | kvm_hypercall3(KVM_HCALL_FUNC_PV_IPI, | ^~~~~~~~~~~~~~~~~~~~~ | KVM_HCALL_FUNC_IPI arch/loongarch/kernel/paravirt.c: At top level: arch/loongarch/kernel/paravirt.c:363:13: error: redefinition of 'pv_disable_steal_time' 363 | static void pv_disable_steal_time(void) | ^~~~~~~~~~~~~~~~~~~~~ arch/loongarch/kernel/paravirt.c:224:13: note: previous definition of 'pv_disable_steal_time' with type 'void(void)' 224 | static void pv_disable_steal_time(void) | ^~~~~~~~~~~~~~~~~~~~~ arch/loongarch/kernel/paravirt.c:393:13: error: redefinition of 'pv_cpu_reboot' 393 | static void pv_cpu_reboot(void *unused) | ^~~~~~~~~~~~~ arch/loongarch/kernel/paravirt.c:289:13: note: previous definition of 'pv_cpu_reboot' with type 'void(void *)' 289 | static void pv_cpu_reboot(void *unused) | ^~~~~~~~~~~~~ arch/loongarch/kernel/paravirt.c:398:12: error: redefinition of 'pv_reboot_notify' 398 | static int pv_reboot_notify(struct notifier_block *nb, unsigned long code, void *unused) | ^~~~~~~~~~~~~~~~ arch/loongarch/kernel/paravirt.c:294:12: note: previous definition of 'pv_reboot_notify' with type 'int(struct notifier_block *, long unsigned int, void *)' 294 | static int pv_reboot_notify(struct notifier_block *nb, unsigned long code, | ^~~~~~~~~~~~~~~~ arch/loongarch/kernel/paravirt.c:404:30: error: redefinition of 'pv_reboot_nb' 404 | static struct notifier_block pv_reboot_nb = { | ^~~~~~~~~~~~ arch/loongarch/kernel/paravirt.c:301:30: note: previous definition of 'pv_reboot_nb' with type 'struct notifier_block' 301 | static struct notifier_block pv_reboot_nb = { | ^~~~~~~~~~~~ arch/loongarch/kernel/paravirt.c:408:12: error: redefinition of 'pv_time_init' 408 | int __init pv_time_init(void) | ^~~~~~~~~~~~ arch/loongarch/kernel/paravirt.c:305:12: note: previous definition of 'pv_time_init' with type 'int(void)' 305 | int __init pv_time_init(void) | ^~~~~~~~~~~~ arch/loongarch/kernel/paravirt.c:453:12: error: redefinition of 'pv_enable_steal_time' 453 | static int pv_enable_steal_time(void) | ^~~~~~~~~~~~~~~~~~~~ arch/loongarch/kernel/paravirt.c:339:12: note: previous definition of 'pv_enable_steal_time' with type 'int(void)' 339 | static int pv_enable_steal_time(void) | ^~~~~~~~~~~~~~~~~~~~ arch/loongarch/kernel/paravirt.c:477:13: error: redefinition of 'pv_disable_steal_time' 477 | static void pv_disable_steal_time(void) | ^~~~~~~~~~~~~~~~~~~~~ arch/loongarch/kernel/paravirt.c:363:13: note: previous definition of 'pv_disable_steal_time' with type 'void(void)' 363 | static void pv_disable_steal_time(void) | ^~~~~~~~~~~~~~~~~~~~~ arch/loongarch/kernel/paravirt.c:484:12: error: redefinition of 'pv_time_cpu_online' 484 | static int pv_time_cpu_online(unsigned int cpu) | ^~~~~~~~~~~~~~~~~~ arch/loongarch/kernel/paravirt.c:370:12: note: previous definition of 'pv_time_cpu_online' with type 'int(unsigned int)' 370 | static int pv_time_cpu_online(unsigned int cpu) | ^~~~~~~~~~~~~~~~~~ arch/loongarch/kernel/paravirt.c:495:12: error: redefinition of 'pv_time_cpu_down_prepare' 495 | static int pv_time_cpu_down_prepare(unsigned int cpu) | ^~~~~~~~~~~~~~~~~~~~~~~~ arch/loongarch/kernel/paravirt.c:381:12: note: previous definition of 'pv_time_cpu_down_prepare' with type 'int(unsigned int)' 381 | static int pv_time_cpu_down_prepare(unsigned int cpu) | ^~~~~~~~~~~~~~~~~~~~~~~~ arch/loongarch/kernel/paravirt.c:507:13: error: redefinition of 'pv_cpu_reboot' 507 | static void pv_cpu_reboot(void *unused) | ^~~~~~~~~~~~~ arch/loongarch/kernel/paravirt.c:393:13: note: previous definition of 'pv_cpu_reboot' with type 'void(void *)' 393 | static void pv_cpu_reboot(void *unused) | ^~~~~~~~~~~~~ arch/loongarch/kernel/paravirt.c:512:12: error: redefinition of 'pv_reboot_notify' 512 | static int pv_reboot_notify(struct notifier_block *nb, unsigned long code, void *unused) | ^~~~~~~~~~~~~~~~ arch/loongarch/kernel/paravirt.c:398:12: note: previous definition of 'pv_reboot_notify' with type 'int(struct notifier_block *, long unsigned int, void *)' 398 | static int pv_reboot_notify(struct notifier_block *nb, unsigned long code, void *unused) | ^~~~~~~~~~~~~~~~ arch/loongarch/kernel/paravirt.c:518:30: error: redefinition of 'pv_reboot_nb' 518 | static struct notifier_block pv_reboot_nb = { | ^~~~~~~~~~~~ arch/loongarch/kernel/paravirt.c:404:30: note: previous definition of 'pv_reboot_nb' with type 'struct notifier_block' 404 | static struct notifier_block pv_reboot_nb = { | ^~~~~~~~~~~~ arch/loongarch/kernel/paravirt.c:522:12: error: redefinition of 'pv_time_init' 522 | int __init pv_time_init(void) | ^~~~~~~~~~~~ arch/loongarch/kernel/paravirt.c:305:12: note: previous definition of 'pv_time_init' with type 'int(void)' 305 | int __init pv_time_init(void) | ^~~~~~~~~~~~
arch/loongarch/kernel/paravirt.c:83:12: warning: 'paravt_steal_clock' defined but not used [-Wunused-function]
83 | static u64 paravt_steal_clock(int cpu) | ^~~~~~~~~~~~~~~~~~
vim +/paravt_steal_clock +83 arch/loongarch/kernel/paravirt.c
82
83 static u64 paravt_steal_clock(int cpu)
84 { 85 int version; 86 u64 steal; 87 struct kvm_steal_time *src; 88 89 src = &per_cpu(steal_time, cpu); 90 do { 91 92 version = src->version; 93 virt_rmb(); /* Make sure that the version is read before the steal */ 94 steal = src->steal; 95 virt_rmb(); /* Make sure that the steal is read before the next version */ 96 97 } while ((version & 1) || (version != src->version)); 98 99 return steal; 100 } 101