Hi Jing, kernel test robot noticed the following build warnings: [auto build test WARNING on 59b723cd2adbac2a34fc8e12c74ae26ae45bf230] url: https://github.com/intel-lab-lkp/linux/commits/Jing-Zhang/KVM-selftests-aarch64-Add-VGIC-selftest-for-save-restore-ITS-table-mappings/20241108-054433 base: 59b723cd2adbac2a34fc8e12c74ae26ae45bf230 patch link: https://lore.kernel.org/r/20241107214137.428439-4-jingzhangos%40google.com patch subject: [PATCH v4 3/5] KVM: arm64: vgic-its: Add a data length check in vgic_its_save_* config: arm64-randconfig-004-20241108 (https://download.01.org/0day-ci/archive/20241108/202411081338.47eReEKu-lkp@xxxxxxxxx/config) compiler: aarch64-linux-gcc (GCC) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241108/202411081338.47eReEKu-lkp@xxxxxxxxx/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@xxxxxxxxx> | Closes: https://lore.kernel.org/oe-kbuild-all/202411081338.47eReEKu-lkp@xxxxxxxxx/ All warnings (new ones prefixed by >>): arch/arm64/kvm/vgic/vgic-its.c: In function 'vgic_its_save_collection_table': >> arch/arm64/kvm/vgic/vgic-its.c:2495:13: warning: unused variable 'val' [-Wunused-variable] 2495 | u64 val; | ^~~ vim +/val +2495 arch/arm64/kvm/vgic/vgic-its.c ea1ad53e1e31a3 virt/kvm/arm/vgic/vgic-its.c Eric Auger 2017-01-09 2484 0aa34b37a78d06 arch/arm64/kvm/vgic/vgic-its.c Sebastian Ott 2024-07-23 2485 /* 3b65808f4b2914 virt/kvm/arm/vgic/vgic-its.c Eric Auger 2016-12-24 2486 * vgic_its_save_collection_table - Save the collection table into 3b65808f4b2914 virt/kvm/arm/vgic/vgic-its.c Eric Auger 2016-12-24 2487 * guest RAM 3b65808f4b2914 virt/kvm/arm/vgic/vgic-its.c Eric Auger 2016-12-24 2488 */ 3b65808f4b2914 virt/kvm/arm/vgic/vgic-its.c Eric Auger 2016-12-24 2489 static int vgic_its_save_collection_table(struct vgic_its *its) 3b65808f4b2914 virt/kvm/arm/vgic/vgic-its.c Eric Auger 2016-12-24 2490 { ea1ad53e1e31a3 virt/kvm/arm/vgic/vgic-its.c Eric Auger 2017-01-09 2491 const struct vgic_its_abi *abi = vgic_its_get_abi(its); c2385eaa6c5a87 virt/kvm/arm/vgic/vgic-its.c Eric Auger 2017-10-26 2492 u64 baser = its->baser_coll_table; 8ad50c8985d805 virt/kvm/arm/vgic/vgic-its.c Kristina Martsenko 2018-09-26 2493 gpa_t gpa = GITS_BASER_ADDR_48_to_52(baser); ea1ad53e1e31a3 virt/kvm/arm/vgic/vgic-its.c Eric Auger 2017-01-09 2494 struct its_collection *collection; ea1ad53e1e31a3 virt/kvm/arm/vgic/vgic-its.c Eric Auger 2017-01-09 @2495 u64 val; ea1ad53e1e31a3 virt/kvm/arm/vgic/vgic-its.c Eric Auger 2017-01-09 2496 size_t max_size, filled = 0; ea1ad53e1e31a3 virt/kvm/arm/vgic/vgic-its.c Eric Auger 2017-01-09 2497 int ret, cte_esz = abi->cte_esz; ea1ad53e1e31a3 virt/kvm/arm/vgic/vgic-its.c Eric Auger 2017-01-09 2498 c2385eaa6c5a87 virt/kvm/arm/vgic/vgic-its.c Eric Auger 2017-10-26 2499 if (!(baser & GITS_BASER_VALID)) ea1ad53e1e31a3 virt/kvm/arm/vgic/vgic-its.c Eric Auger 2017-01-09 2500 return 0; ea1ad53e1e31a3 virt/kvm/arm/vgic/vgic-its.c Eric Auger 2017-01-09 2501 c2385eaa6c5a87 virt/kvm/arm/vgic/vgic-its.c Eric Auger 2017-10-26 2502 max_size = GITS_BASER_NR_PAGES(baser) * SZ_64K; ea1ad53e1e31a3 virt/kvm/arm/vgic/vgic-its.c Eric Auger 2017-01-09 2503 ea1ad53e1e31a3 virt/kvm/arm/vgic/vgic-its.c Eric Auger 2017-01-09 2504 list_for_each_entry(collection, &its->collection_list, coll_list) { ea1ad53e1e31a3 virt/kvm/arm/vgic/vgic-its.c Eric Auger 2017-01-09 2505 ret = vgic_its_save_cte(its, collection, gpa, cte_esz); ea1ad53e1e31a3 virt/kvm/arm/vgic/vgic-its.c Eric Auger 2017-01-09 2506 if (ret) ea1ad53e1e31a3 virt/kvm/arm/vgic/vgic-its.c Eric Auger 2017-01-09 2507 return ret; ea1ad53e1e31a3 virt/kvm/arm/vgic/vgic-its.c Eric Auger 2017-01-09 2508 gpa += cte_esz; ea1ad53e1e31a3 virt/kvm/arm/vgic/vgic-its.c Eric Auger 2017-01-09 2509 filled += cte_esz; ea1ad53e1e31a3 virt/kvm/arm/vgic/vgic-its.c Eric Auger 2017-01-09 2510 } ea1ad53e1e31a3 virt/kvm/arm/vgic/vgic-its.c Eric Auger 2017-01-09 2511 ea1ad53e1e31a3 virt/kvm/arm/vgic/vgic-its.c Eric Auger 2017-01-09 2512 if (filled == max_size) ea1ad53e1e31a3 virt/kvm/arm/vgic/vgic-its.c Eric Auger 2017-01-09 2513 return 0; ea1ad53e1e31a3 virt/kvm/arm/vgic/vgic-its.c Eric Auger 2017-01-09 2514 ea1ad53e1e31a3 virt/kvm/arm/vgic/vgic-its.c Eric Auger 2017-01-09 2515 /* ea1ad53e1e31a3 virt/kvm/arm/vgic/vgic-its.c Eric Auger 2017-01-09 2516 * table is not fully filled, add a last dummy element ea1ad53e1e31a3 virt/kvm/arm/vgic/vgic-its.c Eric Auger 2017-01-09 2517 * with valid bit unset ea1ad53e1e31a3 virt/kvm/arm/vgic/vgic-its.c Eric Auger 2017-01-09 2518 */ c4380c338c9607 arch/arm64/kvm/vgic/vgic-its.c Kunkun Jiang 2024-11-07 2519 return vgic_its_write_entry_lock(its, gpa, 0, cte_esz); 3b65808f4b2914 virt/kvm/arm/vgic/vgic-its.c Eric Auger 2016-12-24 2520 } 3b65808f4b2914 virt/kvm/arm/vgic/vgic-its.c Eric Auger 2016-12-24 2521 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki