[kvmarm:kvm-arm64/nv-wip-v5.0-rc1 67/75] arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2487:11: note: in expansion of macro 'atomic_read'

[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 kvm-arm64/nv-wip-v5.0-rc1
head:   688c386ca096f2c1f2eee386697586c88df5d5bc
commit: ef4e8878a94ec44d0f883dfab21ecfb45fe33309 [67/75] fixup! KVM: arm/arm64: nv: Support multiple nested stage 2 mmu structures
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 ef4e8878a94ec44d0f883dfab21ecfb45fe33309
        # save the attached .config to linux build tree
        GCC_VERSION=7.2.0 make.cross ARCH=arm 

All warnings (new ones prefixed by >>):

   arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1881:29: error: passing argument 1 of 'stage2_set_pmd_huge' from incompatible pointer type [-Werror=incompatible-pointer-types]
      ret = stage2_set_pmd_huge(mmu, memcache, fault_ipa, &new_pmd);
                                ^~~
   arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1109:12: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
    static int stage2_set_pmd_huge(struct kvm_s2_mmu *mmu,
               ^~~~~~~~~~~~~~~~~~~
   arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1893:24: error: passing argument 1 of 'stage2_set_pte' from incompatible pointer type [-Werror=incompatible-pointer-types]
      ret = stage2_set_pte(mmu, memcache, fault_ipa, &new_pte, flags);
                           ^~~
   arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1252:12: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
    static int stage2_set_pte(struct kvm_s2_mmu *mmu,
               ^~~~~~~~~~~~~~
   arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'handle_access_fault':
   arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1922:39: error: 'struct kvm_vcpu_arch' has no member named 'hw_mmu'
     if (!stage2_get_leaf_entry(vcpu->arch.hw_mmu, fault_ipa, &pud, &pmd, &pte))
                                          ^
   arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_handle_guest_abort':
   arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1963:22: error: storage size of 'nested_trans' isn't known
     struct kvm_s2_trans nested_trans;
                         ^~~~~~~~~~~~
   arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2022:9: error: implicit declaration of function 'kvm_walk_nested_s2'; did you mean 'kvm_inject_nested_irq'? [-Werror=implicit-function-declaration]
      ret = kvm_walk_nested_s2(vcpu, fault_ipa, &nested_trans);
            ^~~~~~~~~~~~~~~~~~
            kvm_inject_nested_irq
   arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2024:4: error: implicit declaration of function 'kvm_inject_s2_fault'; did you mean 'kvm_inject_pabt'? [-Werror=implicit-function-declaration]
       kvm_inject_s2_fault(vcpu, nested_trans.esr);
       ^~~~~~~~~~~~~~~~~~~
       kvm_inject_pabt
   arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2029:9: error: implicit declaration of function 'kvm_s2_handle_perm_fault'; did you mean 'handle_mm_fault'? [-Werror=implicit-function-declaration]
      ret = kvm_s2_handle_perm_fault(vcpu, fault_ipa, &nested_trans);
            ^~~~~~~~~~~~~~~~~~~~~~~~
            handle_mm_fault
   arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1963:22: warning: unused variable 'nested_trans' [-Wunused-variable]
     struct kvm_s2_trans nested_trans;
                         ^~~~~~~~~~~~
   arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_unmap_hva_handler':
   arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2129:35: error: 'struct kvm_arch' has no member named 'mmu'
     kvm_unmap_stage2_range(&kvm->arch.mmu, gpa, size);
                                      ^
   arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2130:2: error: implicit declaration of function 'kvm_nested_s2_clear'; did you mean '__nodes_clear'? [-Werror=implicit-function-declaration]
     kvm_nested_s2_clear(kvm);
     ^~~~~~~~~~~~~~~~~~~
     __nodes_clear
   arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_unmap_hva_range':
   arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2137:16: error: 'struct kvm_arch' has no member named 'mmu'
     if (!kvm->arch.mmu.pgd)
                   ^
   arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_set_spte_handler':
   arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2157:27: error: 'struct kvm_arch' has no member named 'mmu'
     stage2_set_pte(&kvm->arch.mmu, NULL, gpa, pte, 0);
                              ^
   arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_set_spte_hva':
   arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2169:16: error: 'struct kvm_arch' has no member named 'mmu'
     if (!kvm->arch.mmu.pgd)
                   ^
   arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_age_hva_handler':
   arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2192:39: error: 'struct kvm_arch' has no member named 'mmu'
     if (!stage2_get_leaf_entry(&kvm->arch.mmu, gpa, &pud, &pmd, &pte))
                                          ^
   arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_test_age_hva_handler':
   arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2217:39: error: 'struct kvm_arch' has no member named 'mmu'
     if (!stage2_get_leaf_entry(&kvm->arch.mmu, gpa, &pud, &pmd, &pte))
                                          ^
   arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_age_hva':
   arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2235:16: error: 'struct kvm_arch' has no member named 'mmu'
     if (!kvm->arch.mmu.pgd)
                   ^
   arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_test_age_hva':
   arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2243:16: error: 'struct kvm_arch' has no member named 'mmu'
     if (!kvm->arch.mmu.pgd)
                   ^
   arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_arch_prepare_memory_region':
   arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2456:36: error: 'struct kvm_arch' has no member named 'mmu'
      kvm_unmap_stage2_range(&kvm->arch.mmu, mem->guest_phys_addr, mem->memory_size);
                                       ^
   arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2458:34: error: 'struct kvm_arch' has no member named 'mmu'
      stage2_flush_memslot(&kvm->arch.mmu, memslot);
                                     ^
   arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_arch_flush_shadow_all':
   arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2484:27: error: 'struct kvm_arch' has no member named 'nested_mmus_size'
     for (i = 0; i < kvm->arch.nested_mmus_size; i++) {
                              ^
   arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2485:38: error: 'struct kvm_arch' has no member named 'nested_mmus'
      struct kvm_s2_mmu *mmu = &kvm->arch.nested_mmus[i];
                                         ^
   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:2487:27: error: dereferencing pointer to incomplete type 'struct kvm_s2_mmu'
      WARN_ON(atomic_read(&mmu->refcnt));
                              ^
   include/asm-generic/bug.h:122:25: note: in definition of macro 'WARN_ON'
     int __ret_warn_on = !!(condition);    \
                            ^~~~~~~~~
   include/linux/compiler.h:261:22: note: in expansion of macro '__READ_ONCE'
    #define READ_ONCE(x) __READ_ONCE(x, 1)
                         ^~~~~~~~~~~
>> arch/arm/include/asm/atomic.h:30:24: note: in expansion of macro 'READ_ONCE'
    #define atomic_read(v) READ_ONCE((v)->counter)
                           ^~~~~~~~~
>> arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2487:11: note: in expansion of macro 'atomic_read'
      WARN_ON(atomic_read(&mmu->refcnt));
              ^~~~~~~~~~~
   arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2490:24: error: passing argument 1 of 'kvm_free_stage2_pgd' from incompatible pointer type [-Werror=incompatible-pointer-types]
       kvm_free_stage2_pgd(mmu);
                           ^~~
   arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1048:6: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
    void kvm_free_stage2_pgd(struct kvm_s2_mmu *mmu)
         ^~~~~~~~~~~~~~~~~~~
   arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2492:17: error: 'struct kvm_arch' has no member named 'nested_mmus'
     kfree(kvm->arch.nested_mmus);
                    ^
   arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2493:11: error: 'struct kvm_arch' has no member named 'nested_mmus'
     kvm->arch.nested_mmus = NULL;
              ^
   arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2494:11: error: 'struct kvm_arch' has no member named 'nested_mmus_size'
     kvm->arch.nested_mmus_size = 0;
              ^
   arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2495:32: error: 'struct kvm_arch' has no member named 'mmu'
     kvm_free_stage2_pgd(&kvm->arch.mmu);
                                   ^
   arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_arch_flush_shadow_memslot':
   arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2505:35: error: 'struct kvm_arch' has no member named 'mmu'
     kvm_unmap_stage2_range(&kvm->arch.mmu, gpa, size);
                                      ^
   cc1: some warnings being treated as errors

vim +/atomic_read +2487 arch/arm/kvm/../../../virt/kvm/arm/mmu.c

  2479	
  2480	void kvm_arch_flush_shadow_all(struct kvm *kvm)
  2481	{
  2482		int i;
  2483	
  2484		for (i = 0; i < kvm->arch.nested_mmus_size; i++) {
  2485			struct kvm_s2_mmu *mmu = &kvm->arch.nested_mmus[i];
  2486	
> 2487			WARN_ON(atomic_read(&mmu->refcnt));
  2488	
  2489			if (!atomic_read(&mmu->refcnt))
  2490				kvm_free_stage2_pgd(mmu);
  2491		}
  2492		kfree(kvm->arch.nested_mmus);
  2493		kvm->arch.nested_mmus = NULL;
  2494		kvm->arch.nested_mmus_size = 0;
  2495		kvm_free_stage2_pgd(&kvm->arch.mmu);
  2496	}
  2497	

---
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