From: kernel test robot <lkp@intel.com>
To: Yan Zhao <yan.y.zhao@intel.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: Re: [RFC PATCH v2 5/5] KVM: Unmap pages only when it's indeed protected for NUMA migration
Date: Thu, 10 Aug 2023 23:19:27 +0800 [thread overview]
Message-ID: <202308102307.MQAoNjsq-lkp@intel.com> (raw)
In-Reply-To: <20230810090218.26244-1-yan.y.zhao@intel.com>
Hi Yan,
[This is a private test report for your RFC patch.]
kernel test robot noticed the following build warnings:
[auto build test WARNING on kvm/queue]
[also build test WARNING on mst-vhost/linux-next linus/master v6.5-rc5 next-20230809]
[cannot apply to akpm-mm/mm-everything kvm/linux-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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Yan-Zhao/mm-mmu_notifier-introduce-a-new-mmu-notifier-flag-MMU_NOTIFIER_RANGE_NUMA/20230810-172955
base: https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue
patch link: https://lore.kernel.org/r/20230810090218.26244-1-yan.y.zhao%40intel.com
patch subject: [RFC PATCH v2 5/5] KVM: Unmap pages only when it's indeed protected for NUMA migration
config: riscv-randconfig-r023-20230810 (https://download.01.org/0day-ci/archive/20230810/202308102307.MQAoNjsq-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
reproduce: (https://download.01.org/0day-ci/archive/20230810/202308102307.MQAoNjsq-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/202308102307.MQAoNjsq-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> arch/riscv/kvm/../../../virt/kvm/kvm_main.c:767:23: warning: pointer type mismatch ('bool (*)(struct kvm *, struct kvm_gfn_range *)' (aka '_Bool (*)(struct kvm *, struct kvm_gfn_range *)') and 'void *') [-Wpointer-type-mismatch]
767 | .handler = !is_numa ? kvm_unmap_gfn_range :
| ^ ~~~~~~~~~~~~~~~~~~~
768 | (void *)kvm_null_fn,
| ~~~~~~~~~~~~~~~~~~~
>> arch/riscv/kvm/../../../virt/kvm/kvm_main.c:770:25: warning: pointer type mismatch ('void (*)(struct kvm *)' and 'void *') [-Wpointer-type-mismatch]
770 | .on_unlock = !is_numa ? kvm_arch_guest_memory_reclaimed :
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
771 | (void *)kvm_null_fn,
| ~~~~~~~~~~~~~~~~~~~
2 warnings generated.
vim +767 arch/riscv/kvm/../../../virt/kvm/kvm_main.c
756
757 static int kvm_mmu_notifier_invalidate_range_start(struct mmu_notifier *mn,
758 const struct mmu_notifier_range *range)
759 {
760 struct kvm *kvm = mmu_notifier_to_kvm(mn);
761 bool is_numa = (range->event == MMU_NOTIFY_PROTECTION_VMA) &&
762 (range->flags & MMU_NOTIFIER_RANGE_NUMA);
763 const struct kvm_hva_range hva_range = {
764 .start = range->start,
765 .end = range->end,
766 .pte = __pte(0),
> 767 .handler = !is_numa ? kvm_unmap_gfn_range :
768 (void *)kvm_null_fn,
769 .on_lock = kvm_mmu_invalidate_begin,
> 770 .on_unlock = !is_numa ? kvm_arch_guest_memory_reclaimed :
771 (void *)kvm_null_fn,
772 .flush_on_ret = !is_numa ? true : false,
773 .may_block = mmu_notifier_range_blockable(range),
774 };
775
776 trace_kvm_unmap_hva_range(range->start, range->end);
777
778 /*
779 * Prevent memslot modification between range_start() and range_end()
780 * so that conditionally locking provides the same result in both
781 * functions. Without that guarantee, the mmu_invalidate_in_progress
782 * adjustments will be imbalanced.
783 *
784 * Pairs with the decrement in range_end().
785 */
786 spin_lock(&kvm->mn_invalidate_lock);
787 kvm->mn_active_invalidate_count++;
788 spin_unlock(&kvm->mn_invalidate_lock);
789
790 /*
791 * Invalidate pfn caches _before_ invalidating the secondary MMUs, i.e.
792 * before acquiring mmu_lock, to avoid holding mmu_lock while acquiring
793 * each cache's lock. There are relatively few caches in existence at
794 * any given time, and the caches themselves can check for hva overlap,
795 * i.e. don't need to rely on memslot overlap checks for performance.
796 * Because this runs without holding mmu_lock, the pfn caches must use
797 * mn_active_invalidate_count (see above) instead of
798 * mmu_invalidate_in_progress.
799 */
800 gfn_to_pfn_cache_invalidate_start(kvm, range->start, range->end,
801 hva_range.may_block);
802
803 __kvm_handle_hva_range(kvm, &hva_range);
804
805 return 0;
806 }
807
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2023-08-10 15:20 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-10 8:56 [RFC PATCH v2 0/5] Reduce NUMA balance caused TLB-shootdowns in a VM Yan Zhao
2023-08-10 8:57 ` [RFC PATCH v2 1/5] mm/mmu_notifier: introduce a new mmu notifier flag MMU_NOTIFIER_RANGE_NUMA Yan Zhao
2023-08-10 8:58 ` [RFC PATCH v2 2/5] mm: don't set PROT_NONE to maybe-dma-pinned pages for NUMA-migrate purpose Yan Zhao
2023-08-10 9:00 ` [RFC PATCH v2 3/5] mm/mmu_notifier: introduce a new callback .numa_protect Yan Zhao
2023-08-10 9:00 ` [RFC PATCH v2 4/5] mm/autonuma: call .numa_protect() when page is protected for NUMA migrate Yan Zhao
2023-08-10 13:45 ` kernel test robot
2023-08-10 13:55 ` kernel test robot
2023-08-11 18:52 ` Nadav Amit
2023-08-14 7:52 ` Yan Zhao
2023-08-10 9:02 ` [RFC PATCH v2 5/5] KVM: Unmap pages only when it's indeed protected for NUMA migration Yan Zhao
2023-08-10 13:16 ` bibo mao
2023-08-11 3:45 ` Yan Zhao
2023-08-11 7:40 ` bibo mao
2023-08-11 8:01 ` Yan Zhao
2023-08-11 17:14 ` Sean Christopherson
2023-08-11 17:18 ` Jason Gunthorpe
2023-08-14 6:52 ` Yan Zhao
2023-08-14 7:44 ` Yan Zhao
2023-08-14 16:40 ` Sean Christopherson
2023-08-15 1:54 ` Yan Zhao
2023-08-15 14:50 ` Sean Christopherson
2023-08-16 2:43 ` bibo mao
2023-08-16 3:44 ` bibo mao
2023-08-16 5:14 ` Yan Zhao
2023-08-16 7:29 ` bibo mao
2023-08-16 7:18 ` Yan Zhao
2023-08-16 7:53 ` bibo mao
2023-08-16 13:39 ` Sean Christopherson
2023-08-10 15:19 ` kernel test robot [this message]
2023-08-10 9:34 ` [RFC PATCH v2 0/5] Reduce NUMA balance caused TLB-shootdowns in a VM David Hildenbrand
2023-08-10 9:50 ` Yan Zhao
2023-08-11 17:25 ` David Hildenbrand
2023-08-11 18:20 ` John Hubbard
2023-08-11 18:39 ` David Hildenbrand
2023-08-11 19:35 ` John Hubbard
2023-08-14 9:09 ` Yan Zhao
2023-08-15 2:34 ` John Hubbard
2023-08-16 7:43 ` David Hildenbrand
2023-08-16 9:06 ` Yan Zhao
2023-08-16 9:49 ` David Hildenbrand
2023-08-16 18:00 ` John Hubbard
2023-08-17 5:05 ` Yan Zhao
2023-08-17 7:38 ` David Hildenbrand
2023-08-18 0:13 ` Yan Zhao
2023-08-18 2:29 ` John Hubbard
2023-09-04 9:18 ` Yan Zhao
2023-08-15 2:36 ` Yuan Yao
2023-08-15 2:37 ` Yan Zhao
2023-08-10 13:58 ` Chao Gao
2023-08-11 5:22 ` Yan Zhao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202308102307.MQAoNjsq-lkp@intel.com \
--to=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=yan.y.zhao@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.