search for: viommu_domain_free

Displaying 20 results from an estimated 59 matches for "viommu_domain_free".

2020 Apr 15
0
[PATCH AUTOSEL 5.6 107/129] iommu/virtio: Fix freeing of incomplete domains
From: Jean-Philippe Brucker <jean-philippe at linaro.org> [ Upstream commit 7062af3ed2ba451029e3733d9f677c68f5ea9e77 ] Calling viommu_domain_free() on a domain that hasn't been finalised (not attached to any device, for example) can currently cause an Oops, because we attempt to call ida_free() on ID 0, which may either be unallocated or used by another domain. Only initialise the vdomain->viommu pointer, which denotes a finalised do...
2020 Apr 15
0
[PATCH AUTOSEL 5.5 088/106] iommu/virtio: Fix freeing of incomplete domains
From: Jean-Philippe Brucker <jean-philippe at linaro.org> [ Upstream commit 7062af3ed2ba451029e3733d9f677c68f5ea9e77 ] Calling viommu_domain_free() on a domain that hasn't been finalised (not attached to any device, for example) can currently cause an Oops, because we attempt to call ida_free() on ID 0, which may either be unallocated or used by another domain. Only initialise the vdomain->viommu pointer, which denotes a finalised do...
2020 Apr 15
0
[PATCH AUTOSEL 5.4 69/84] iommu/virtio: Fix freeing of incomplete domains
From: Jean-Philippe Brucker <jean-philippe at linaro.org> [ Upstream commit 7062af3ed2ba451029e3733d9f677c68f5ea9e77 ] Calling viommu_domain_free() on a domain that hasn't been finalised (not attached to any device, for example) can currently cause an Oops, because we attempt to call ida_free() on ID 0, which may either be unallocated or used by another domain. Only initialise the vdomain->viommu pointer, which denotes a finalised do...
2020 Apr 18
0
[PATCH AUTOSEL 5.6 48/73] iommu/virtio: Fix freeing of incomplete domains
From: Jean-Philippe Brucker <jean-philippe at linaro.org> [ Upstream commit 7062af3ed2ba451029e3733d9f677c68f5ea9e77 ] Calling viommu_domain_free() on a domain that hasn't been finalised (not attached to any device, for example) can currently cause an Oops, because we attempt to call ida_free() on ID 0, which may either be unallocated or used by another domain. Only initialise the vdomain->viommu pointer, which denotes a finalised do...
2020 Apr 18
0
[PATCH AUTOSEL 5.5 45/75] iommu/virtio: Fix freeing of incomplete domains
From: Jean-Philippe Brucker <jean-philippe at linaro.org> [ Upstream commit 7062af3ed2ba451029e3733d9f677c68f5ea9e77 ] Calling viommu_domain_free() on a domain that hasn't been finalised (not attached to any device, for example) can currently cause an Oops, because we attempt to call ida_free() on ID 0, which may either be unallocated or used by another domain. Only initialise the vdomain->viommu pointer, which denotes a finalised do...
2020 Apr 18
0
[PATCH AUTOSEL 5.4 42/78] iommu/virtio: Fix freeing of incomplete domains
From: Jean-Philippe Brucker <jean-philippe at linaro.org> [ Upstream commit 7062af3ed2ba451029e3733d9f677c68f5ea9e77 ] Calling viommu_domain_free() on a domain that hasn't been finalised (not attached to any device, for example) can currently cause an Oops, because we attempt to call ida_free() on ID 0, which may either be unallocated or used by another domain. Only initialise the vdomain->viommu pointer, which denotes a finalised do...
2023 Sep 04
1
[PATCH 2/2] iommu/virtio: Add ops->flush_iotlb_all and enable deferred flush
..._ops = { > .map_pages = viommu_map_pages, > .unmap_pages = viommu_unmap_pages, > .iova_to_phys = viommu_iova_to_phys, > + .flush_iotlb_all = viommu_flush_iotlb_all, > .iotlb_sync = viommu_iotlb_sync, > .iotlb_sync_map = viommu_iotlb_sync_map, > .free = viommu_domain_free, > > -- > 2.39.2 >
2023 Sep 06
1
[PATCH 2/2] iommu/virtio: Add ops->flush_iotlb_all and enable deferred flush
..._unmap_pages, > > > > .iova_to_phys = viommu_iova_to_phys, > > > > + .flush_iotlb_all = viommu_flush_iotlb_all, > > > > .iotlb_sync = viommu_iotlb_sync, > > > > .iotlb_sync_map = viommu_iotlb_sync_map, > > > > .free = viommu_domain_free, > > > > > > > > -- > > > > 2.39.2 > > > > >
2023 Sep 06
1
[PATCH 2/2] iommu/virtio: Add ops->flush_iotlb_all and enable deferred flush
..._unmap_pages, > > > > .iova_to_phys = viommu_iova_to_phys, > > > > + .flush_iotlb_all = viommu_flush_iotlb_all, > > > > .iotlb_sync = viommu_iotlb_sync, > > > > .iotlb_sync_map = viommu_iotlb_sync_map, > > > > .free = viommu_domain_free, > > > > > > > > -- > > > > 2.39.2 > > > > >
2023 Sep 04
0
[PATCH 1/2] iommu/virtio: Make use of ops->iotlb_sync_map
...*entry, *new_entry, *msi = NULL; > @@ -1058,6 +1070,7 @@ static struct iommu_ops viommu_ops = { > .unmap_pages = viommu_unmap_pages, > .iova_to_phys = viommu_iova_to_phys, > .iotlb_sync = viommu_iotlb_sync, > + .iotlb_sync_map = viommu_iotlb_sync_map, > .free = viommu_domain_free, > } > }; > > -- > 2.39.2 >
2020 May 06
1
[PATCH v5] iommu/virtio: Use page size bitmap supported by endpoint
...t;id = (unsigned int)ret; > > - domain->pgsize_bitmap = viommu->pgsize_bitmap; > + domain->pgsize_bitmap = vdev->pgsize_bitmap; > domain->geometry = viommu->geometry; > > vdomain->map_flags = viommu->map_flags; > @@ -654,6 +671,29 @@ static void viommu_domain_free(struct iommu_domain *domain) > kfree(vdomain); > } > > +/* > + * Check whether the endpoint's capabilities are compatible with other > + * endpoints in the domain. Report any inconsistency. > + */ > +static bool viommu_endpoint_is_compatible(struct viommu_endpoint *...
2020 May 07
2
[EXT] Re: [PATCH v5] iommu/virtio: Use page size bitmap supported by endpoint
...>pgsize_bitmap = viommu->pgsize_bitmap; > > > + domain->pgsize_bitmap = vdev->pgsize_bitmap; > > > domain->geometry = viommu->geometry; > > > > > > vdomain->map_flags = viommu->map_flags; > > > @@ -654,6 +671,29 @@ static void viommu_domain_free(struct iommu_domain > > *domain) > > > kfree(vdomain); > > > } > > > > > > +/* > > > + * Check whether the endpoint's capabilities are compatible with > > > +other > > > + * endpoints in the domain. Report any inconsistency...
2020 May 12
1
[PATCH v5] iommu/virtio: Use page size bitmap supported by endpoint
...t;id = (unsigned int)ret; > > - domain->pgsize_bitmap = viommu->pgsize_bitmap; > + domain->pgsize_bitmap = vdev->pgsize_bitmap; > domain->geometry = viommu->geometry; > > vdomain->map_flags = viommu->map_flags; > @@ -654,6 +671,29 @@ static void viommu_domain_free(struct iommu_domain *domain) > kfree(vdomain); > } > > +/* > + * Check whether the endpoint's capabilities are compatible with other > + * endpoints in the domain. Report any inconsistency. > + */ > +static bool viommu_endpoint_is_compatible(struct viommu_endpoint *...
2020 May 07
0
[EXT] Re: [PATCH v5] iommu/virtio: Use page size bitmap supported by endpoint
...- domain->pgsize_bitmap = viommu->pgsize_bitmap; >>> + domain->pgsize_bitmap = vdev->pgsize_bitmap; >>> domain->geometry = viommu->geometry; >>> >>> vdomain->map_flags = viommu->map_flags; >>> @@ -654,6 +671,29 @@ static void viommu_domain_free(struct iommu_domain >> *domain) >>> kfree(vdomain); >>> } >>> >>> +/* >>> + * Check whether the endpoint's capabilities are compatible with >>> +other >>> + * endpoints in the domain. Report any inconsistency. >>>...
2020 May 07
0
[EXT] Re: [PATCH v5] iommu/virtio: Use page size bitmap supported by endpoint
..._bitmap = viommu->pgsize_bitmap; >>>> + domain->pgsize_bitmap = vdev->pgsize_bitmap; >>>> domain->geometry = viommu->geometry; >>>> >>>> vdomain->map_flags = viommu->map_flags; >>>> @@ -654,6 +671,29 @@ static void viommu_domain_free(struct iommu_domain >>> *domain) >>>> kfree(vdomain); >>>> } >>>> >>>> +/* >>>> + * Check whether the endpoint's capabilities are compatible with >>>> +other >>>> + * endpoints in the domain. Report...
2018 Nov 16
2
[PATCH v4 5/7] iommu: Add virtio-iommu driver
...>pgsize_bitmap; > + domain->geometry = viommu->geometry; > + > + ret = ida_alloc_max(&viommu->domain_ids, max_domain, GFP_KERNEL); > + if (ret >= 0) > + vdomain->id = (unsigned int)ret; > + > + return ret > 0 ? 0 : ret; > +} > + > +static void viommu_domain_free(struct iommu_domain *domain) > +{ > + struct viommu_domain *vdomain = to_viommu_domain(domain); > + > + iommu_put_dma_cookie(domain); > + > + /* Free all remaining mappings (size 2^64) */ > + viommu_del_mappings(vdomain, 0, 0); > + > + if (vdomain->viommu) > + ida_...
2018 Nov 16
2
[PATCH v4 5/7] iommu: Add virtio-iommu driver
...>pgsize_bitmap; > + domain->geometry = viommu->geometry; > + > + ret = ida_alloc_max(&viommu->domain_ids, max_domain, GFP_KERNEL); > + if (ret >= 0) > + vdomain->id = (unsigned int)ret; > + > + return ret > 0 ? 0 : ret; > +} > + > +static void viommu_domain_free(struct iommu_domain *domain) > +{ > + struct viommu_domain *vdomain = to_viommu_domain(domain); > + > + iommu_put_dma_cookie(domain); > + > + /* Free all remaining mappings (size 2^64) */ > + viommu_del_mappings(vdomain, 0, 0); > + > + if (vdomain->viommu) > + ida_...
2018 Oct 12
3
[PATCH v3 5/7] iommu: Add virtio-iommu driver
...>pgsize_bitmap; > + domain->geometry = viommu->geometry; > + > + ret = ida_alloc_max(&viommu->domain_ids, max_domain, GFP_KERNEL); > + if (ret >= 0) > + vdomain->id = (unsigned int)ret; > + > + return ret > 0 ? 0 : ret; > +} > + > +static void viommu_domain_free(struct iommu_domain *domain) > +{ > + struct viommu_domain *vdomain = to_viommu_domain(domain); > + > + iommu_put_dma_cookie(domain); > + > + /* Free all remaining mappings (size 2^64) */ > + viommu_del_mappings(vdomain, 0, 0); > + > + if (vdomain->viommu) > + ida_...
2018 Oct 12
3
[PATCH v3 5/7] iommu: Add virtio-iommu driver
...>pgsize_bitmap; > + domain->geometry = viommu->geometry; > + > + ret = ida_alloc_max(&viommu->domain_ids, max_domain, GFP_KERNEL); > + if (ret >= 0) > + vdomain->id = (unsigned int)ret; > + > + return ret > 0 ? 0 : ret; > +} > + > +static void viommu_domain_free(struct iommu_domain *domain) > +{ > + struct viommu_domain *vdomain = to_viommu_domain(domain); > + > + iommu_put_dma_cookie(domain); > + > + /* Free all remaining mappings (size 2^64) */ > + viommu_del_mappings(vdomain, 0, 0); > + > + if (vdomain->viommu) > + ida_...
2018 Nov 22
0
[PATCH v5 5/7] iommu: Add virtio-iommu driver
...= viommu; + + domain->pgsize_bitmap = viommu->pgsize_bitmap; + domain->geometry = viommu->geometry; + + ret = ida_alloc_max(&viommu->domain_ids, max_domain, GFP_KERNEL); + if (ret >= 0) + vdomain->id = (unsigned int)ret; + + return ret > 0 ? 0 : ret; +} + +static void viommu_domain_free(struct iommu_domain *domain) +{ + struct viommu_domain *vdomain = to_viommu_domain(domain); + + iommu_put_dma_cookie(domain); + + /* Free all remaining mappings (size 2^64) */ + viommu_del_mappings(vdomain, 0, 0); + + if (vdomain->viommu) + ida_free(&vdomain->viommu->domain_ids, vdoma...