On Wed, Nov 29, 2023 at 04:26:15PM -0400, Jason Gunthorpe wrote:
On Mon, Nov 20, 2023 at 07:29:43PM +0800, Lu Baolu wrote:I suppose the answer is the next patch deletes that stuff.
@@ -2311,6 +2316,13 @@ static int device_def_domain_type(struct device *dev)Doesn't this return from def_domain_type completely prevent using an
return IOMMU_DOMAIN_IDENTITY;
}
+ /*
+ * Hardware does not support the passthrough translation mode.
+ * Always use a dynamaic mapping domain.
+ */
+ if (!ecap_pass_through(iommu->ecap))
+ return IOMMU_DOMAIN_DMA;
+
identity domain?
I thought the point of this was to allow the identity domain but have
it be translating?
I would probably have structured this in the other order, first add
this hunk and say that old HW is being de-supported. Remove all the
now-dead code creating the 1:1 page table, then refactor the remainder
to create the global static.