Merge branches 'intel/vt-d', 'amd/amd-vi' and 'iommufd/arm-smmuv3-nested' into next
authorJoerg Roedel <jroedel@suse.de>
Fri, 15 Nov 2024 08:27:43 +0000 (09:27 +0100)
committerJoerg Roedel <jroedel@suse.de>
Fri, 15 Nov 2024 08:27:43 +0000 (09:27 +0100)
1  2  3  4 
drivers/iommu/Kconfig
drivers/iommu/amd/amd_iommu.h
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h
drivers/iommu/arm/arm-smmu/arm-smmu.c
drivers/iommu/intel/iommu.c
drivers/iommu/iommu.c
include/linux/iommu.h
include/uapi/linux/iommufd.h

Simple merge
Simple merge
@@@@@ -3084,8 -3082,7 -3084,8 -3102,8 +3100,9 @@@@@ arm_smmu_domain_alloc_user(struct devic
                           const struct iommu_user_data *user_data)
    {
        struct arm_smmu_master *master = dev_iommu_priv_get(dev);
 -      const u32 PAGING_FLAGS = IOMMU_HWPT_ALLOC_DIRTY_TRACKING;
 +      const u32 PAGING_FLAGS = IOMMU_HWPT_ALLOC_DIRTY_TRACKING |
- -                                     IOMMU_HWPT_ALLOC_PASID;
++++                             IOMMU_HWPT_ALLOC_PASID |
+++                              IOMMU_HWPT_ALLOC_NEST_PARENT;
        struct arm_smmu_domain *smmu_domain;
        int ret;
    
Simple merge
@@@@@ -1908,23 -1792,12 -1908,23 -1908,23 +1792,12 @@@@@ static int domain_setup_passthrough(str
    static int domain_setup_first_level(struct intel_iommu *iommu,
                                    struct dmar_domain *domain,
                                    struct device *dev,
- --                                u32 pasid)
+ ++                                u32 pasid, struct iommu_domain *old)
    {
        struct dma_pte *pgd = domain->pgd;
- --    int agaw, level;
- --    int flags = 0;
-   
-       /*
-        * Skip top levels of page tables for iommu which has
-        * less agaw than default. Unnecessary for PT mode.
-        */
-       for (agaw = domain->agaw; agaw > iommu->agaw; agaw--) {
-               pgd = phys_to_virt(dma_pte_addr(pgd));
-               if (!dma_pte_present(pgd))
-                       return -ENOMEM;
-       }
+ ++    int level, flags = 0;
    
  --    /*
  --     * Skip top levels of page tables for iommu which has
  --     * less agaw than default. Unnecessary for PT mode.
  --     */
  --    for (agaw = domain->agaw; agaw > iommu->agaw; agaw--) {
  --            pgd = phys_to_virt(dma_pte_addr(pgd));
  --            if (!dma_pte_present(pgd))
  --                    return -ENOMEM;
  --    }
  --
- --    level = agaw_to_level(agaw);
+ ++    level = agaw_to_level(domain->agaw);
        if (level != 4 && level != 5)
                return -EINVAL;
    
Simple merge
@@@@@ -782,14 -785,12 -782,14 -782,12 +781,14 @@@@@ static inline void iommu_iotlb_gather_i
        };
    }
    
 ---extern int bus_iommu_probe(const struct bus_type *bus);
  + extern bool iommu_present(const struct bus_type *bus);
    extern bool device_iommu_capable(struct device *dev, enum iommu_cap cap);
    extern bool iommu_group_has_isolated_msi(struct iommu_group *group);
 - -extern struct iommu_domain *iommu_domain_alloc(const struct bus_type *bus);
 - -struct iommu_domain *iommu_paging_domain_alloc(struct device *dev);
 + +struct iommu_domain *iommu_paging_domain_alloc_flags(struct device *dev, unsigned int flags);
 + +static inline struct iommu_domain *iommu_paging_domain_alloc(struct device *dev)
 + +{
 + +    return iommu_paging_domain_alloc_flags(dev, 0);
 + +}
    extern void iommu_domain_free(struct iommu_domain *domain);
    extern int iommu_attach_device(struct iommu_domain *domain,
                               struct device *dev);
Simple merge