On 9/20/23 9:10 PM, Liu, Yi L wrote:
I've also considered what Baolu described, but it requires to do someIf you are going to do that then intel_iommu_domain_alloc() should+No need to bounce between core and driver. Just,
+ domain = iommu_domain_alloc(dev->bus);
intel_iommu_domain_alloc(IOMMU_DOMAIN_UNMANAGED);
and fully initialize it before return.
fully initialize the domain, not here.
extra initialization which is duplicated with iommu_domain_alloc().
So I chose this simple way.
Okay, got you.
Once Jason's paging domain and Robin's bus->iommu_ops retirement series
have landed, the VT-d driver will need some refactoring. Therefore, I'm
fine with you using a simpler approach here. I'll refactor everything
later.