Re: [PATCH] iommu: set group default domain before creating direct mappings

From: Joerg Roedel
Date: Tue Dec 17 2019 - 05:45:49 EST


On Wed, Dec 11, 2019 at 08:54:21AM +0800, Lu Baolu wrote:
> On 12/11/19 2:56 AM, Jerry Snitselaar wrote:
> > iommu_group_create_direct_mappings uses group->default_domain, but
> > right after it is called, request_default_domain_for_dev calls
> > iommu_domain_free for the default domain, and sets the group default
> > domain to a different domain. Move the
> > iommu_group_create_direct_mappings call to after the group default
> > domain is set, so the direct mappings get associated with that domain.
> >
> > Cc: Joerg Roedel <jroedel@xxxxxxx>
> > Cc: Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>
>
> This fix looks good to me.
>
> Reviewed-by: Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>

Applied, thanks.