Hi Steven, [FYI, it's a private test report for your RFC patch.] [auto build test WARNING on arm64/for-next/core] [also build test WARNING on v5.11-rc3] [cannot apply to kvmarm/next kvm/linux-next next-20210115] [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/Steven-Price/MTE-support-for-KVM-guest/20210115-233109 base: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core config: arm64-allyesconfig (attached as .config) compiler: aarch64-linux-gcc (GCC) 9.3.0 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 # https://github.com/0day-ci/linux/commit/ddde8cff287aad027c9fa0015afe26ced5041f50 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Steven-Price/MTE-support-for-KVM-guest/20210115-233109 git checkout ddde8cff287aad027c9fa0015afe26ced5041f50 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): arch/arm64/kvm/arm.c: In function 'kvm_vm_ioctl_mte_copy_tags': >> arch/arm64/kvm/arm.c:1313:9: warning: variable 'pages' set but not used [-Wunused-but-set-variable] 1313 | size_t pages; | ^~~~~ vim +/pages +1313 arch/arm64/kvm/arm.c 1305 1306 static int kvm_vm_ioctl_mte_copy_tags(struct kvm *kvm, 1307 struct kvm_arm_copy_mte_tags *copy_tags) 1308 { 1309 gpa_t guest_ipa = copy_tags->guest_ipa; 1310 size_t length = copy_tags->length; 1311 void __user *tags = copy_tags->addr; 1312 gpa_t gfn; > 1313 size_t pages; 1314 bool write = !(copy_tags->flags & KVM_ARM_TAGS_FROM_GUEST); 1315 1316 if (copy_tags->flags & ~KVM_ARM_TAGS_FROM_GUEST) 1317 return -EINVAL; 1318 1319 if (length & ~PAGE_MASK || guest_ipa & ~PAGE_MASK) 1320 return -EINVAL; 1321 1322 gfn = gpa_to_gfn(guest_ipa); 1323 pages = length >> PAGE_SHIFT; 1324 1325 while (length > 0) { 1326 kvm_pfn_t pfn = gfn_to_pfn_prot(kvm, gfn, write, NULL); 1327 void *maddr; 1328 unsigned long num_tags = PAGE_SIZE / MTE_GRANULE_SIZE; 1329 1330 if (is_error_noslot_pfn(pfn)) 1331 return -ENOENT; 1332 1333 maddr = page_address(pfn_to_page(pfn)); 1334 1335 if (!write) { 1336 num_tags = mte_copy_tags_to_user(tags, maddr, num_tags); 1337 kvm_release_pfn_clean(pfn); 1338 } else { 1339 num_tags = mte_copy_tags_from_user(maddr, tags, 1340 num_tags); 1341 kvm_release_pfn_dirty(pfn); 1342 } 1343 1344 if (num_tags != PAGE_SIZE / MTE_GRANULE_SIZE) 1345 return -EFAULT; 1346 1347 gfn++; 1348 tags += num_tags; 1349 length -= PAGE_SIZE; 1350 } 1351 1352 return 0; 1353 } 1354 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org