Re: [PATCH v3] KVM: kvmclock: Fix vCPUs > 64 can't be online/hotpluged

From: kernel test robot
Date: Mon Feb 01 2021 - 12:33:55 EST


Hi Wanpeng,

I love your patch! Perhaps something to improve:

[auto build test WARNING on kvm/linux-next]
[also build test WARNING on linux/master vhost/linux-next next-20210125]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url: https://github.com/0day-ci/linux/commits/Wanpeng-Li/KVM-kvmclock-Fix-vCPUs-64-can-t-be-online-hotpluged/20210201-163927
base: https://git.kernel.org/pub/scm/virt/kvm/kvm.git linux-next
config: x86_64-randconfig-a013-20210201 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 275c6af7d7f1ed63a03d05b4484413e447133269)
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
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/0day-ci/linux/commit/132ae1cea476666dff619b5a7c5675011edd7fe7
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Wanpeng-Li/KVM-kvmclock-Fix-vCPUs-64-can-t-be-online-hotpluged/20210201-163927
git checkout 132ae1cea476666dff619b5a7c5675011edd7fe7
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

>> arch/x86/kernel/kvmclock.c:274:5: warning: ISO C90 forbids mixing declarations and code [-Wdeclaration-after-statement]
u8 flags;
^
1 warning generated.


vim +274 arch/x86/kernel/kvmclock.c

6a1cac56f41f9e Brijesh Singh 2018-09-14 268
e499a9b6dc488a Thomas Gleixner 2018-07-19 269 static int __init kvm_setup_vsyscall_timeinfo(void)
e499a9b6dc488a Thomas Gleixner 2018-07-19 270 {
132ae1cea47666 Wanpeng Li 2021-02-01 271 kvmclock_init_mem();
132ae1cea47666 Wanpeng Li 2021-02-01 272
e499a9b6dc488a Thomas Gleixner 2018-07-19 273 #ifdef CONFIG_X86_64
e499a9b6dc488a Thomas Gleixner 2018-07-19 @274 u8 flags;
e499a9b6dc488a Thomas Gleixner 2018-07-19 275
95a3d4454bb1cf Thomas Gleixner 2018-07-19 276 if (!per_cpu(hv_clock_per_cpu, 0) || !kvmclock_vsyscall)
e499a9b6dc488a Thomas Gleixner 2018-07-19 277 return 0;
e499a9b6dc488a Thomas Gleixner 2018-07-19 278
95a3d4454bb1cf Thomas Gleixner 2018-07-19 279 flags = pvclock_read_flags(&hv_clock_boot[0].pvti);
e499a9b6dc488a Thomas Gleixner 2018-07-19 280 if (!(flags & PVCLOCK_TSC_STABLE_BIT))
95a3d4454bb1cf Thomas Gleixner 2018-07-19 281 return 0;
e499a9b6dc488a Thomas Gleixner 2018-07-19 282
b95a8a27c300d1 Thomas Gleixner 2020-02-07 283 kvm_clock.vdso_clock_mode = VDSO_CLOCKMODE_PVCLOCK;
e499a9b6dc488a Thomas Gleixner 2018-07-19 284 #endif
6a1cac56f41f9e Brijesh Singh 2018-09-14 285
e499a9b6dc488a Thomas Gleixner 2018-07-19 286 return 0;
e499a9b6dc488a Thomas Gleixner 2018-07-19 287 }
e499a9b6dc488a Thomas Gleixner 2018-07-19 288 early_initcall(kvm_setup_vsyscall_timeinfo);
e499a9b6dc488a Thomas Gleixner 2018-07-19 289

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip