From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============1519376531169175693==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH 2/3] KVM: x86: add system attribute to retrieve full set of supported xsave states Date: Thu, 27 Jan 2022 05:56:10 +0800 Message-ID: <202201270505.Zw7qAhV1-lkp@intel.com> In-Reply-To: <20220126152210.3044876-3-pbonzini@redhat.com> List-Id: --===============1519376531169175693== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Paolo, I love your patch! Perhaps something to improve: [auto build test WARNING on kvm/queue] [also build test WARNING on tip/master linus/master v5.17-rc1 next-20220125] [cannot apply to linux/master] [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/Paolo-Bonzini/KVM-x86-expo= rt-supported_xcr0-via-UAPI/20220126-232404 base: https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20220127= /202201270505.Zw7qAhV1-lkp(a)intel.com/config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce (this is a W=3D1 build): # https://github.com/0day-ci/linux/commit/b2fde1186382c3f79ca5fd335= b692b80de2f94af git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Paolo-Bonzini/KVM-x86-export-suppo= rted_xcr0-via-UAPI/20220126-232404 git checkout b2fde1186382c3f79ca5fd335b692b80de2f94af # save the config file to linux build tree mkdir build_dir make W=3D1 O=3Dbuild_dir ARCH=3Di386 SHELL=3D/bin/bash arch/x86/kvm/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): In file included from include/linux/uaccess.h:11, from include/linux/sched/task.h:11, from include/linux/sched/signal.h:9, from include/linux/rcuwait.h:6, from include/linux/percpu-rwsem.h:7, from include/linux/fs.h:33, from include/linux/huge_mm.h:8, from include/linux/mm.h:717, from include/linux/kvm_host.h:16, from arch/x86/kvm/x86.c:19: arch/x86/kvm/x86.c: In function 'kvm_x86_dev_get_attr': >> arch/x86/kvm/x86.c:4344:32: warning: cast to pointer from integer of dif= ferent size [-Wint-to-pointer-cast] 4344 | if (put_user(supported_xcr0, (u64 __user *)attr->addr)) | ^ arch/x86/include/asm/uaccess.h:221:24: note: in definition of macro 'do_= put_user_call' 221 | register __typeof__(*(ptr)) __val_pu asm("%"_ASM_AX); \ | ^~~ arch/x86/kvm/x86.c:4344:7: note: in expansion of macro 'put_user' 4344 | if (put_user(supported_xcr0, (u64 __user *)attr->addr)) | ^~~~~~~~ >> arch/x86/kvm/x86.c:4344:32: warning: cast to pointer from integer of dif= ferent size [-Wint-to-pointer-cast] 4344 | if (put_user(supported_xcr0, (u64 __user *)attr->addr)) | ^ arch/x86/include/asm/uaccess.h:223:14: note: in definition of macro 'do_= put_user_call' 223 | __ptr_pu =3D (ptr); \ | ^~~ arch/x86/kvm/x86.c:4344:7: note: in expansion of macro 'put_user' 4344 | if (put_user(supported_xcr0, (u64 __user *)attr->addr)) | ^~~~~~~~ >> arch/x86/kvm/x86.c:4344:32: warning: cast to pointer from integer of dif= ferent size [-Wint-to-pointer-cast] 4344 | if (put_user(supported_xcr0, (u64 __user *)attr->addr)) | ^ arch/x86/include/asm/uaccess.h:230:31: note: in definition of macro 'do_= put_user_call' 230 | [size] "i" (sizeof(*(ptr))) \ | ^~~ arch/x86/kvm/x86.c:4344:7: note: in expansion of macro 'put_user' 4344 | if (put_user(supported_xcr0, (u64 __user *)attr->addr)) | ^~~~~~~~ vim +4344 arch/x86/kvm/x86.c 4336 = 4337 static int kvm_x86_dev_get_attr(struct kvm_device_attr *attr) 4338 { 4339 if (attr->group) 4340 return -ENXIO; 4341 = 4342 switch (attr->attr) { 4343 case KVM_X86_XCOMP_GUEST_SUPP: > 4344 if (put_user(supported_xcr0, (u64 __user *)attr->addr)) 4345 return -EFAULT; 4346 return 0; 4347 default: 4348 return -ENXIO; 4349 break; 4350 } 4351 } 4352 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============1519376531169175693==--