Re: [PATCH v2 5/6] KVM: x86/xen: Maintain valid mapping of Xen shared_info page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi David,

I love your patch! Yet something to improve:

[auto build test ERROR on mst-vhost/linux-next]
[also build test ERROR on linus/master v5.15 next-20211101]
[cannot apply to kvm/queue]
[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/David-Woodhouse/KVM-x86-xen-Add-in-kernel-Xen-event-channel-delivery/20211102-035038
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git linux-next
config: i386-debian-10.3 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/0day-ci/linux/commit/bba9531e42e9dd7a2ab056057a94d56f43643e24
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review David-Woodhouse/KVM-x86-xen-Add-in-kernel-Xen-event-channel-delivery/20211102-035038
        git checkout bba9531e42e9dd7a2ab056057a94d56f43643e24
        # save the attached .config to linux build tree
        mkdir build_dir
        make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash arch/x86/kvm/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

   In file included from include/linux/dynamic_debug.h:6,
                    from include/linux/printk.h:555,
                    from include/linux/kernel.h:19,
                    from include/linux/cpumask.h:10,
                    from include/linux/mm_types_task.h:14,
                    from include/linux/mm_types.h:5,
                    from arch/x86/kvm/irq.h:13,
                    from arch/x86/kvm/mmu/mmu.c:18:
   arch/x86/kvm/mmu/mmu.c: In function 'kvm_unmap_gfn_range':
>> arch/x86/kvm/mmu/mmu.c:1592:30: error: 'kvm_xen_enabled' undeclared (first use in this function); did you mean 'kvm_xen_msr_enabled'?
    1592 |  if (static_branch_unlikely(&kvm_xen_enabled.key)) {
         |                              ^~~~~~~~~~~~~~~
   include/linux/jump_label.h:496:43: note: in definition of macro 'static_branch_unlikely'
     496 |  if (__builtin_types_compatible_p(typeof(*x), struct static_key_true)) \
         |                                           ^
   arch/x86/kvm/mmu/mmu.c:1592:30: note: each undeclared identifier is reported only once for each function it appears in
    1592 |  if (static_branch_unlikely(&kvm_xen_enabled.key)) {
         |                              ^~~~~~~~~~~~~~~
   include/linux/jump_label.h:496:43: note: in definition of macro 'static_branch_unlikely'
     496 |  if (__builtin_types_compatible_p(typeof(*x), struct static_key_true)) \
         |                                           ^


vim +1592 arch/x86/kvm/mmu/mmu.c

  1587	
  1588	bool kvm_unmap_gfn_range(struct kvm *kvm, struct kvm_gfn_range *range)
  1589	{
  1590		bool flush = false;
  1591	
> 1592		if (static_branch_unlikely(&kvm_xen_enabled.key)) {
  1593			write_lock(&kvm->arch.xen.shinfo_lock);
  1594	
  1595			if (kvm->arch.xen.shared_info &&
  1596			    kvm->arch.xen.shinfo_gfn >= range->start &&
  1597			    kvm->arch.xen.shinfo_cache.gfn < range->end) {
  1598				/*
  1599				 * If kvm_xen_shared_info_init() had *finished* mapping the
  1600				 * page and assigned the pointer for real, then mark the page
  1601				 * dirty now instead of via the eventual cache teardown.
  1602				 */
  1603				if (kvm->arch.xen.shared_info != KVM_UNMAPPED_PAGE) {
  1604					kvm_set_pfn_dirty(kvm->arch.xen.shinfo_cache.pfn);
  1605					kvm->arch.xen.shinfo_cache.dirty = false;
  1606				}
  1607	
  1608				kvm->arch.xen.shared_info = NULL;
  1609			}
  1610	
  1611			write_unlock(&kvm->arch.xen.shinfo_lock);
  1612		}
  1613	
  1614		if (kvm_memslots_have_rmaps(kvm))
  1615			flush = kvm_handle_gfn_range(kvm, range, kvm_unmap_rmapp);
  1616	
  1617		if (is_tdp_mmu_enabled(kvm))
  1618			flush |= kvm_tdp_mmu_unmap_gfn_range(kvm, range, flush);
  1619	
  1620		return flush;
  1621	}
  1622	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux