* [android-common:android17-6.18-2026-04 10/10] arch/arm64/kvm/pkvm.c:687:13: warning: variable 'pages' set but not used
@ 2026-07-02 12:02 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-07-02 12:02 UTC (permalink / raw)
To: cros-kernel-buildreports; +Cc: oe-kbuild-all
Hi Sebastian,
FYI, the error/warning still remains.
tree: https://android.googlesource.com/kernel/common android17-6.18-2026-04
head: edf956ebceeb7cdad6af1e86e3bc0f8ab20253ae
commit: 312ab0333e80d95c4c1f17fa07ceb344cec5313d [10/10] ANDROID: KVM: On guest exit ask Trustzone to relinquish the borrowed pages
config: arm64-defconfig (https://download.01.org/0day-ci/archive/20260702/202607021923.YF0tmrex-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 16.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260702/202607021923.YF0tmrex-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202607021923.YF0tmrex-lkp@intel.com/
All warnings (new ones prefixed by >>):
arch/arm64/kvm/pkvm.c: In function '__pkvm_pgtable_stage2_unmap':
>> arch/arm64/kvm/pkvm.c:687:13: warning: variable 'pages' set but not used [-Wunused-but-set-variable=]
687 | u64 pages, nr_busy;
| ^~~~~
vim +/pages +687 arch/arm64/kvm/pkvm.c
679
680 static int __pkvm_pgtable_stage2_unmap(struct kvm_pgtable *pgt, u64 start, u64 end)
681 {
682 struct kvm *kvm = kvm_s2_mmu_to_kvm(pgt->mmu);
683 pkvm_handle_t handle = kvm->arch.pkvm.handle;
684 struct mm_struct *mm = current->mm;
685 struct kvm_pinned_page *ppage;
686 struct pkvm_mapping *mapping;
> 687 u64 pages, nr_busy;
688 int ret;
689
690 if (!handle)
691 return 0;
692
693 for_each_mapping_in_range_safe(pgt, start, end, mapping) {
694 int ret;
695
696 WARN_ON(kvm_vm_is_protected(kvm));
697
698 ret = kvm_call_hyp_nvhe(__pkvm_host_unshare_guest, handle,
699 mapping->gfn, mapping->nr_pages);
700
701 if (WARN_ON(ret))
702 return ret;
703
704 pkvm_mapping_remove(mapping, &pgt->pkvm_mappings);
705 kfree(mapping);
706 }
707
708 retry:
709 pages = 0;
710 nr_busy = 0;
711 ppage = kvm_pinned_pages_iter_first(&kvm->arch.pkvm.pinned_pages, start, end);
712 while (ppage) {
713 struct kvm_pinned_page *next = kvm_pinned_pages_iter_next(ppage, start, end);
714
715 WARN_ON(!kvm_vm_is_protected(kvm));
716 ret = __reclaim_dying_page(ppage, handle);
717 cond_resched();
718 if (ret == -EBUSY) {
719 nr_busy++;
720 ppage = next;
721 continue;
722 }
723 WARN_ON(ret);
724 unpin_user_pages_dirty_lock(&ppage->page, 1, true);
725 account_locked_vm(mm, 1 << ppage->order, false);
726 kvm_pinned_pages_remove(ppage, &kvm->arch.pkvm.pinned_pages);
727 kfree(ppage);
728 ppage = next;
729 }
730
731 if (nr_busy) {
732 do {
733 ret = kvm_call_hyp_nvhe(__pkvm_reclaim_dying_guest_ffa_resources,
734 kvm->arch.pkvm.handle);
735 WARN_ON(ret && ret != -EAGAIN);
736 cond_resched();
737 } while (ret == -EAGAIN);
738 goto retry;
739 }
740
741 return 0;
742 }
743
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-02 12:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-02 12:02 [android-common:android17-6.18-2026-04 10/10] arch/arm64/kvm/pkvm.c:687:13: warning: variable 'pages' set but not used kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.