[kvmarm:5.1-fixes 6/6] arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1154:35: error: 'S2_PUD_MASK' undeclared; did you mean 'S2_PMD_MASK'?

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git 5.1-fixes
head:   4c6b77dd0036d42268cc1e6c5ab5a9e9d98cae65
commit: 4c6b77dd0036d42268cc1e6c5ab5a9e9d98cae65 [6/6] KVM: arm/arm64: Fix handling of stage2 huge mappings
config: arm-axm55xx_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 4c6b77dd0036d42268cc1e6c5ab5a9e9d98cae65
        # save the attached .config to linux build tree
        GCC_VERSION=7.2.0 make.cross ARCH=arm 

All errors (new ones prefixed by >>):

   arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'stage2_set_pud_huge':
>> arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1154:35: error: 'S2_PUD_MASK' undeclared (first use in this function); did you mean 'S2_PMD_MASK'?
       unmap_stage2_range(kvm, addr & S2_PUD_MASK, S2_PUD_SIZE);
                                      ^~~~~~~~~~~
                                      S2_PMD_MASK
   arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1154:35: note: each undeclared identifier is reported only once for each function it appears in
>> arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1154:48: error: 'S2_PUD_SIZE' undeclared (first use in this function); did you mean 'S2_PMD_SIZE'?
       unmap_stage2_range(kvm, addr & S2_PUD_MASK, S2_PUD_SIZE);
                                                   ^~~~~~~~~~~
                                                   S2_PMD_SIZE
   In file included from arch/arm/include/asm/bug.h:60:0,
                    from include/linux/bug.h:5,
                    from include/linux/mmdebug.h:5,
                    from include/linux/mm.h:9,
                    from include/linux/mman.h:5,
                    from arch/arm/kvm/../../../virt/kvm/arm/mmu.c:19:
>> arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1157:17: error: implicit declaration of function 'pud_pfn'; did you mean 'pmd_pfn'? [-Werror=implicit-function-declaration]
       WARN_ON_ONCE(pud_pfn(old_pud) != pud_pfn(*new_pudp));
                    ^
   include/asm-generic/bug.h:148:27: note: in definition of macro 'WARN_ON_ONCE'
     int __ret_warn_once = !!(condition);   \
                              ^~~~~~~~~
   cc1: some warnings being treated as errors

vim +1154 arch/arm/kvm/../../../virt/kvm/arm/mmu.c

  1128	
  1129	static int stage2_set_pud_huge(struct kvm *kvm, struct kvm_mmu_memory_cache *cache,
  1130				       phys_addr_t addr, const pud_t *new_pudp)
  1131	{
  1132		pud_t *pudp, old_pud;
  1133	
  1134	retry:
  1135		pudp = stage2_get_pud(kvm, cache, addr);
  1136		VM_BUG_ON(!pudp);
  1137	
  1138		old_pud = *pudp;
  1139	
  1140		/*
  1141		 * A large number of vcpus faulting on the same stage 2 entry,
  1142		 * can lead to a refault due to the stage2_pud_clear()/tlb_flush().
  1143		 * Skip updating the page tables if there is no change.
  1144		 */
  1145		if (pud_val(old_pud) == pud_val(*new_pudp))
  1146			return 0;
  1147	
  1148		if (stage2_pud_present(kvm, old_pud)) {
  1149			/*
  1150			 * If we already have table level mapping for this block, unmap
  1151			 * the range for this block and retry.
  1152			 */
  1153			if (!stage2_pud_huge(kvm, old_pud)) {
> 1154				unmap_stage2_range(kvm, addr & S2_PUD_MASK, S2_PUD_SIZE);
  1155				goto retry;
  1156			} else {
> 1157				WARN_ON_ONCE(pud_pfn(old_pud) != pud_pfn(*new_pudp));
  1158				stage2_pud_clear(kvm, pudp);
  1159				kvm_tlb_flush_vmid_ipa(kvm, addr);
  1160			}
  1161		} else {
  1162			get_page(virt_to_page(pudp));
  1163		}
  1164	
  1165		kvm_set_pud(pudp, *new_pudp);
  1166		return 0;
  1167	}
  1168	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip

_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux