Re: [PATCH v2 03/12] KVM: x86: Expose TSC offset controls to userspace

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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-controls-for-migrating-system-counter-state/20210718-103407
base:   https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue
config: i386-randconfig-a013-20210718 (attached as .config)
compiler: gcc-10 (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0
reproduce (this is a W=1 build):
        # https://github.com/0day-ci/linux/commit/1e9a9a8e956c70659f72ad66a7d8176ff4756061
        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 1e9a9a8e956c70659f72ad66a7d8176ff4756061
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

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/kvm/x86.c: In function 'get_kvmclock_and_realtime':
   arch/x86/kvm/x86.c:2844:7: error: implicit declaration of function 'kvm_get_walltime_and_clockread' [-Werror=implicit-function-declaration]
    2844 |   if (kvm_get_walltime_and_clockread(&ts, &tsc_val)) {
         |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/x86/kvm/x86.c: In function 'kvm_arch_tsc_get_attr':
>> arch/x86/kvm/x86.c:4945:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    4945 |  void __user *uaddr = (void __user *)attr->addr;
         |                       ^
   arch/x86/kvm/x86.c: In function 'kvm_arch_tsc_set_attr':
   arch/x86/kvm/x86.c:4969:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    4969 |  void __user *uaddr = (void __user *)attr->addr;
         |                       ^
   arch/x86/kvm/x86.c: In function 'kvm_arch_tsc_get_attr':
   arch/x86/kvm/x86.c:4949:28: warning: this statement may fall through [-Wimplicit-fallthrough=]
    4949 |  case KVM_VCPU_TSC_OFFSET: {
         |                            ^
   arch/x86/kvm/x86.c:4959:2: note: here
    4959 |  default:
         |  ^~~~~~~
   cc1: some warnings being treated as errors


vim +4945 arch/x86/kvm/x86.c

  4941	
  4942	static int kvm_arch_tsc_get_attr(struct kvm_vcpu *vcpu,
  4943					 struct kvm_device_attr *attr)
  4944	{
> 4945		void __user *uaddr = (void __user *)attr->addr;
  4946		int r;
  4947	
  4948		switch (attr->attr) {
  4949		case KVM_VCPU_TSC_OFFSET: {
  4950			u64 offset;
  4951	
  4952			offset = kvm_vcpu_read_tsc_offset(vcpu);
  4953			r = -EFAULT;
  4954			if (copy_to_user(uaddr, &offset, sizeof(offset)))
  4955				break;
  4956	
  4957			r = 0;
  4958		}
  4959		default:
  4960			r = -ENXIO;
  4961		}
  4962	
  4963		return r;
  4964	}
  4965	

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux