Hi Jacob, I love your patch! Yet something to improve: [auto build test ERROR on iommu/next] [also build test ERROR on linus/master v5.6 next-20200410] [cannot apply to linux/master] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982] url: https://github.com/0day-ci/linux/commits/Jacob-Pan/Nested-Shared-Virtual-Address-SVA-VT-d-support/20200405-041811 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: ia64-defconfig (attached as .config) compiler: ia64-linux-gcc (GCC) 9.3.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree GCC_VERSION=9.3.0 make.cross ARCH=ia64 If you fix the issue, kindly add following tag as appropriate Reported-by: kbuild test robot All errors (new ones prefixed by >>): drivers/iommu/intel-pasid.c: In function 'intel_pasid_setup_nested': >> drivers/iommu/intel-pasid.c:799:7: error: implicit declaration of function 'cpu_feature_enabled'; did you mean 'pci_ari_enabled'? [-Werror=implicit-function-declaration] 799 | if (cpu_feature_enabled(X86_FEATURE_LA57) && | ^~~~~~~~~~~~~~~~~~~ | pci_ari_enabled >> drivers/iommu/intel-pasid.c:799:27: error: 'X86_FEATURE_LA57' undeclared (first use in this function); did you mean 'X86_FEATURE_ANY'? 799 | if (cpu_feature_enabled(X86_FEATURE_LA57) && | ^~~~~~~~~~~~~~~~ | X86_FEATURE_ANY drivers/iommu/intel-pasid.c:799:27: note: each undeclared identifier is reported only once for each function it appears in cc1: some warnings being treated as errors vim +799 drivers/iommu/intel-pasid.c 740 741 /** 742 * intel_pasid_setup_nested() - Set up PASID entry for nested translation. 743 * This could be used for guest shared virtual address. In this case, the 744 * first level page tables are used for GVA-GPA translation in the guest, 745 * second level page tables are used for GPA-HPA translation. 746 * 747 * @iommu: IOMMU which the device belong to 748 * @dev: Device to be set up for translation 749 * @gpgd: FLPTPTR: First Level Page translation pointer in GPA 750 * @pasid: PASID to be programmed in the device PASID table 751 * @pasid_data: Additional PASID info from the guest bind request 752 * @domain: Domain info for setting up second level page tables 753 * @addr_width: Address width of the first level (guest) 754 */ 755 int intel_pasid_setup_nested(struct intel_iommu *iommu, 756 struct device *dev, pgd_t *gpgd, 757 int pasid, struct iommu_gpasid_bind_data_vtd *pasid_data, 758 struct dmar_domain *domain, 759 int addr_width) 760 { 761 struct pasid_entry *pte; 762 struct dma_pte *pgd; 763 int ret = 0; 764 u64 pgd_val; 765 int agaw; 766 u16 did; 767 768 if (!ecap_nest(iommu->ecap)) { 769 pr_err_ratelimited("IOMMU: %s: No nested translation support\n", 770 iommu->name); 771 return -EINVAL; 772 } 773 774 if (!(domain->flags & DOMAIN_FLAG_NESTING_MODE)) { 775 pr_err_ratelimited("Domain is not in nesting mode, %x\n", domain->flags); 776 return -EINVAL; 777 } 778 779 pte = intel_pasid_get_entry(dev, pasid); 780 if (WARN_ON(!pte)) 781 return -EINVAL; 782 783 /* 784 * Caller must ensure PASID entry is not in use, i.e. not bind the 785 * same PASID to the same device twice. 786 */ 787 if (pasid_pte_is_present(pte)) 788 return -EBUSY; 789 790 pasid_clear_entry(pte); 791 792 /* Sanity checking performed by caller to make sure address 793 * width matching in two dimensions: 794 * 1. CPU vs. IOMMU 795 * 2. Guest vs. Host. 796 */ 797 switch (addr_width) { 798 case ADDR_WIDTH_5LEVEL: > 799 if (cpu_feature_enabled(X86_FEATURE_LA57) && --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org