On Mon, Mar 23, 2020 at 06:04:37PM +0000, Bharat Bhushan wrote: > > > -static int viommu_domain_finalise(struct viommu_dev *viommu, > > > +static int viommu_domain_finalise(struct viommu_endpoint *vdev, > > > struct iommu_domain *domain) > > > { > > > int ret; > > > struct viommu_domain *vdomain = to_viommu_domain(domain); > > > + struct viommu_dev *viommu = vdev->viommu; > > > > > > vdomain->viommu = viommu; > > > vdomain->map_flags = viommu->map_flags; > > > > > > - domain->pgsize_bitmap = viommu->pgsize_bitmap; > > > + if (vdev->pgsize_bitmap) > > > + domain->pgsize_bitmap = vdev->pgsize_bitmap; > > > + else > > > + domain->pgsize_bitmap = viommu->pgsize_bitmap; > > > + > > > > nit: it could be nicer to initialize vdev->pgsize_bitmap in add_device(), > > To what size we should initialize in add_device, PAGE_SIZE? No to viommu->pgsize_bitmap Thanks, Jean _______________________________________________ Virtualization mailing list Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linuxfoundation.org/mailman/listinfo/virtualization