Re: [PATCH 04/10] iommu: Mark dev_iommu_get() with lockdep

2023-11-28 Thread Baolu Lu
On 2023/11/29 8:48, Jason Gunthorpe wrote: Allocation of dev->iommu must be done under the iommu_probe_device_lock. Mark this with lockdep to discourage future mistakes. Reviewed-by: Jerry Snitselaar Tested-by: Hector Martin Signed-off-by: Jason Gunthorpe --- drivers/iommu/iommu.c | 2 ++ 1

Re: [PATCH 07/10] acpi: Do not return struct iommu_ops from acpi_iommu_configure_id()

2023-11-28 Thread Baolu Lu
On 2023/11/29 8:48, Jason Gunthorpe wrote: Nothing needs this pointer. Return a normal error code with the usual IOMMU semantic that ENODEV means 'there is no IOMMU driver'. Acked-by: Rafael J. Wysocki Reviewed-by: Jerry Snitselaar Tested-by: Hector Martin Signed-off-by: Jason Gunthorpe ---

Re: [PATCH 02/10] iommmu/of: Do not return struct iommu_ops from of_iommu_configure()

2023-11-28 Thread Baolu Lu
On 2023/11/29 8:47, Jason Gunthorpe wrote: Nothing needs this pointer. Return a normal error code with the usual IOMMU semantic that ENODEV means 'there is no IOMMU driver'. Reviewed-by: Jerry Snitselaar Acked-by: Rob Herring Tested-by: Hector Martin Signed-off-by: Jason Gunthorpe ---

Re: [PATCH v2 08/10] iommu/intel: Use GFP_KERNEL in sleepable contexts

2023-01-19 Thread Baolu Lu
On 2023/1/19 2:00, Jason Gunthorpe wrote: These contexts are sleepable, so use the proper annotation. The GFP_ATOMIC was added mechanically in the prior patches. Signed-off-by: Jason Gunthorpe Reviewed-by: Lu Baolu Best regards, baolu

Re: [PATCH v2 07/10] iommu/intel: Support the gfp argument to the map_pages op

2023-01-19 Thread Baolu Lu
On 2023/1/19 19:57, Baolu Lu wrote: On 2023/1/19 2:00, Jason Gunthorpe wrote: Flow it down to alloc_pgtable_page() via pfn_to_dma_pte() and __domain_mapping(). Signed-off-by: Jason Gunthorpe Irrelevant to this patch, GFP_ATOMIC could be changed to GFP_KERNEL in some places. I will follow up

Re: [PATCH v2 07/10] iommu/intel: Support the gfp argument to the map_pages op

2023-01-19 Thread Baolu Lu
On 2023/1/19 2:00, Jason Gunthorpe wrote: Flow it down to alloc_pgtable_page() via pfn_to_dma_pte() and __domain_mapping(). Signed-off-by: Jason Gunthorpe Irrelevant to this patch, GFP_ATOMIC could be changed to GFP_KERNEL in some places. I will follow up further to clean it up. For this

Re: [PATCH v2 06/10] iommu/intel: Add a gfp parameter to alloc_pgtable_page()

2023-01-19 Thread Baolu Lu
On 2023/1/19 2:00, Jason Gunthorpe wrote: This is eventually called by iommufd through intel_iommu_map_pages() and it should not be forced to atomic. Push the GFP_ATOMIC to all callers. Signed-off-by: Jason Gunthorpe Reviewed-by: Lu Baolu Best regards, baolu

Re: [PATCH 7/8] iommu/intel: Support the gfp argument to the map_pages op

2023-01-17 Thread Baolu Lu
On 2023/1/17 11:38, Tian, Kevin wrote: From: Jason Gunthorpe Sent: Saturday, January 7, 2023 12:43 AM @@ -2368,7 +2372,7 @@ static int iommu_domain_identity_map(struct dmar_domain *domain, return __domain_mapping(domain, first_vpfn, first_vpfn, last_vpfn