Message ID | 4a3c08af-6f6f-ac84-7c98-46529f96fefc@jsigle.com |
---|---|
State | Superseded |
Headers | show |
Series | To Greg KH: Re: [PATCH] iommu/vt-d: Fix kernel panic caused by 416fa531c816: Preset Access/Dirty bits for IOVA over FL | expand |
--- a/drivers/iommu/intel/iommu.c 2021-05-14 09:50:46.000000000 +0200 +++ b/drivers/iommu/intel/iommu.c 2021-05-16 01:02:17.816810690 +0200 @@ -2373,7 +2373,10 @@ static int __domain_mapping(struct dmar_ } } - pteval = ((phys_addr_t)phys_pfn << VTD_PAGE_SHIFT) | attr; + if (!sg) { + sg_res = nr_pages; + pteval = ((phys_addr_t)phys_pfn << VTD_PAGE_SHIFT) | attr; + } while (nr_pages > 0) { uint64_t tmp;