Hi Oliver,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on kvm/queue]
[also build test WARNING on vhost/linux-next v5.14-rc1 next-20210716]
[cannot apply to kvmarm/next]
[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/Oliver-Upton/KVM-Add-idempotent-...
base:
https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue
config: x86_64-randconfig-a014-20210718 (attached as .config)
compiler: clang version 13.0.0 (
https://github.com/llvm/llvm-project
5d5b08761f944d5b9822d582378333cc4b36a0a7)
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/72b6d584e6ac692038a7d70e8782f0dfa...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
Oliver-Upton/KVM-Add-idempotent-controls-for-migrating-system-counter-state/20210718-103407
git checkout 72b6d584e6ac692038a7d70e8782f0dfa179e5fb
# 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(a)intel.com>
All warnings (new ones prefixed by >>):
> arch/x86/kvm/x86.c:2784: warning: This comment starts with
'/**', but isn't a kernel-doc comment. Refer
Documentation/doc-guide/kernel-doc.rst
* Returns true if realtime and TSC values
were written back to the caller.
vim +2784 arch/x86/kvm/x86.c
2782
2783 /**
2784 * Returns true if realtime and TSC values were written back to
the caller.
2785 * Returns false if a clock triplet cannot be obtained, such as
if the host's
2786 * realtime clock is not based on the TSC.
2787 */
2788 static bool get_kvmclock_and_realtime(struct kvm *kvm, u64 *kvmclock_ns,
2789 u64 *realtime_ns, u64 *tsc)
2790 {
2791 struct kvm_arch *ka = &kvm->arch;
2792 struct pvclock_vcpu_time_info hv_clock;
2793 unsigned long flags;
2794 bool ret = false;
2795
2796 spin_lock_irqsave(&ka->pvclock_gtod_sync_lock, flags);
2797 if (!ka->use_master_clock) {
2798 spin_unlock_irqrestore(&ka->pvclock_gtod_sync_lock, flags);
2799 *kvmclock_ns = get_kvmclock_base_ns() + ka->kvmclock_offset;
2800 return false;
2801 }
2802
2803 hv_clock.tsc_timestamp = ka->master_cycle_now;
2804 hv_clock.system_time = ka->master_kernel_ns + ka->kvmclock_offset;
2805 spin_unlock_irqrestore(&ka->pvclock_gtod_sync_lock, flags);
2806
2807 /* both __this_cpu_read() and rdtsc() should be on the same cpu */
2808 get_cpu();
2809
2810 if (__this_cpu_read(cpu_tsc_khz)) {
2811 struct timespec64 ts;
2812 u64 tsc_val;
2813
2814 kvm_get_time_scale(NSEC_PER_SEC, __this_cpu_read(cpu_tsc_khz) * 1000LL,
2815 &hv_clock.tsc_shift,
2816 &hv_clock.tsc_to_system_mul);
2817
2818 if (kvm_get_walltime_and_clockread(&ts, &tsc_val)) {
2819 *realtime_ns = ts.tv_nsec + NSEC_PER_SEC * ts.tv_sec;
2820 *tsc = tsc_val;
2821 ret = true;
2822 }
2823
2824 *kvmclock_ns = __pvclock_read_cycles(&hv_clock, tsc_val);
2825 } else
2826 *kvmclock_ns = get_kvmclock_base_ns() + ka->kvmclock_offset;
2827
2828 put_cpu();
2829
2830 return ret;
2831 }
2832
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org