search for: put_resv_region

Displaying 20 results from an estimated 61 matches for "put_resv_region".

Did you mean: put_resv_regions
2019 Dec 18
7
[PATCH v3 0/5] iommu: Implement generic_iommu_put_resv_regions()
...region. Instead of open-coding the loop to do this in each driver, extract the code into a common function that can be used by all these drivers. Changes in v3: - add Reviewed-by from Jean-Philippe Brucker on virtio patch - add Acked-by from Will Deacon on ARM SMMU patch - rename to generic_iommu_put_resv_regions() Changes in v2: - change subject prefix to "iommu: virtio: " for virtio-iommu.c driver Thierry Thierry Reding (5): iommu: Implement generic_iommu_put_resv_regions() iommu: arm: Use generic_iommu_put_resv_regions() iommu: amd: Use generic_iommu_put_resv_regions() iommu: intel:...
2019 Dec 09
8
[PATCH v2 0/5] iommu: Implement iommu_put_resv_regions_simple()
...d region. Instead of open-coding the loop to do this in each driver, extract the code into a common function that can be used by all these drivers. Changes in v2: - change subject prefix to "iommu: virtio: " for virtio-iommu.c driver Thierry Thierry Reding (5): iommu: Implement iommu_put_resv_regions_simple() iommu: arm: Use iommu_put_resv_regions_simple() iommu: amd: Use iommu_put_resv_regions_simple() iommu: intel: Use iommu_put_resv_regions_simple() iommu: virtio: Use iommu_put_resv_regions_simple() drivers/iommu/amd_iommu.c | 11 +---------- drivers/iommu/arm-smmu-v3.c | 11 +...
2019 Sep 18
1
[PATCH 1/5] iommu: Implement iommu_put_resv_regions_simple()
...+++ > include/linux/iommu.h | 2 ++ > 2 files changed, 21 insertions(+) > > diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c > index 0f585b614657..73a2a6b13507 100644 > --- a/drivers/iommu/iommu.c > +++ b/drivers/iommu/iommu.c > @@ -2170,6 +2170,25 @@ void iommu_put_resv_regions(struct device *dev, struct list_head *list) > ops->put_resv_regions(dev, list); > } > > +/** > + * iommu_put_resv_regions_simple - Reserved region driver helper > + * @dev: device for which to free reserved regions > + * @list: reserved region list for device > + *...
2019 Dec 09
0
[PATCH v2 2/5] iommu: arm: Use iommu_put_resv_regions_simple()
...rm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c index effe72eb89e7..eebf6086080f 100644 --- a/drivers/iommu/arm-smmu-v3.c +++ b/drivers/iommu/arm-smmu-v3.c @@ -2710,15 +2710,6 @@ static void arm_smmu_get_resv_regions(struct device *dev, iommu_dma_get_resv_regions(dev, head); } -static void arm_smmu_put_resv_regions(struct device *dev, - struct list_head *head) -{ - struct iommu_resv_region *entry, *next; - - list_for_each_entry_safe(entry, next, head, list) - kfree(entry); -} - static struct iommu_ops arm_smmu_ops = { .capable = arm_smmu_capable, .domain_alloc = arm_smmu_domain_alloc, @@ -27...
2019 Dec 09
0
[PATCH v2 5/5] iommu: virtio: Use iommu_put_resv_regions_simple()
...s/iommu/virtio-iommu.c index 315c7cc4f99d..834e56a28d4d 100644 --- a/drivers/iommu/virtio-iommu.c +++ b/drivers/iommu/virtio-iommu.c @@ -837,14 +837,6 @@ static void viommu_get_resv_regions(struct device *dev, struct list_head *head) iommu_dma_get_resv_regions(dev, head); } -static void viommu_put_resv_regions(struct device *dev, struct list_head *head) -{ - struct iommu_resv_region *entry, *next; - - list_for_each_entry_safe(entry, next, head, list) - kfree(entry); -} - static struct iommu_ops viommu_ops; static struct virtio_driver virtio_iommu_drv; @@ -914,7 +906,7 @@ static int viommu_add_devic...
2019 Dec 19
0
[PATCH v3 4/5] iommu: intel: Use generic_iommu_put_resv_regions()
On Thu, Dec 19, 2019 at 09:53:22AM +0800, Lu Baolu wrote: > Please tweak the title to > > "iommu/vt-d: Use generic_iommu_put_resv_regions()" > > then, > > Acked-by: Lu Baolu <baolu.lu at linux.intel.com> > > Best regards, > baolu Joerg, do you want me to resend with this change or is it more efficient if you fix up the subject while applying? Thierry > On 12/18/19 9:42 PM, Thierry Reding wrot...
2018 Jan 16
1
[RFC PATCH v2 3/5] iommu/virtio-iommu: Add event queue
...nt buffer\n"); > + } > + > + if (!virtqueue_kick(vq)) > + dev_err(viommu->dev, "kick failed\n"); > +} > + > /* IOMMU API */ > > static bool viommu_capable(enum iommu_cap cap) > @@ -938,19 +1018,44 @@ static struct iommu_ops viommu_ops = { > .put_resv_regions = viommu_put_resv_regions, > }; > > -static int viommu_init_vq(struct viommu_dev *viommu) > +static int viommu_init_vqs(struct viommu_dev *viommu) > { > struct virtio_device *vdev = dev_to_virtio(viommu->dev); > - const char *name = "request"; > - void *r...
2020 Apr 14
0
[PATCH v2 20/33] iommu/virtio: Convert to probe/release_device() call-backs
...ust be ready. - */ - group = iommu_group_get_for_dev(dev); - if (IS_ERR(group)) { - ret = PTR_ERR(group); - goto err_unlink_dev; - } - - iommu_group_put(group); - - return PTR_ERR_OR_ZERO(group); - -err_unlink_dev: - iommu_device_unlink(&viommu->iommu, dev); err_free_dev: generic_iommu_put_resv_regions(dev, &vdev->resv_regions); kfree(vdev); - return ret; + return ERR_PTR(ret); } -static void viommu_remove_device(struct device *dev) +static void viommu_release_device(struct device *dev) { - struct viommu_endpoint *vdev; struct iommu_fwspec *fwspec = dev_iommu_fwspec_get(dev); +...
2020 Apr 14
0
[PATCH v2 16/33] iommu/vt-d: Convert to probe/release_device() call-backs
...ntel_iommu_unmap, .iova_to_phys = intel_iommu_iova_to_phys, - .add_device = intel_iommu_add_device, - .remove_device = intel_iommu_remove_device, + .probe_device = intel_iommu_probe_device, + .release_device = intel_iommu_release_device, .get_resv_regions = intel_iommu_get_resv_regions, .put_resv_regions = generic_iommu_put_resv_regions, .apply_resv_region = intel_iommu_apply_resv_region, -- 2.17.1
2018 Feb 14
0
[PATCH 3/4] iommu/virtio: Add event queue
...et) + dev_err(viommu->dev, "could not add event buffer\n"); + } + + if (!virtqueue_kick(vq)) + dev_err(viommu->dev, "kick failed\n"); +} + /* IOMMU API */ static bool viommu_capable(enum iommu_cap cap) @@ -934,19 +1015,44 @@ static struct iommu_ops viommu_ops = { .put_resv_regions = viommu_put_resv_regions, }; -static int viommu_init_vq(struct viommu_dev *viommu) +static int viommu_init_vqs(struct viommu_dev *viommu) { struct virtio_device *vdev = dev_to_virtio(viommu->dev); - const char *name = "request"; - void *ret; + const char *names[] = { "requ...
2017 Nov 17
0
[RFC PATCH v2 3/5] iommu/virtio-iommu: Add event queue
...et) + dev_err(viommu->dev, "could not add event buffer\n"); + } + + if (!virtqueue_kick(vq)) + dev_err(viommu->dev, "kick failed\n"); +} + /* IOMMU API */ static bool viommu_capable(enum iommu_cap cap) @@ -938,19 +1018,44 @@ static struct iommu_ops viommu_ops = { .put_resv_regions = viommu_put_resv_regions, }; -static int viommu_init_vq(struct viommu_dev *viommu) +static int viommu_init_vqs(struct viommu_dev *viommu) { struct virtio_device *vdev = dev_to_virtio(viommu->dev); - const char *name = "request"; - void *ret; + const char *names[] = { "requ...
2017 Nov 17
11
[RFC PATCH v2 0/5] Add virtio-iommu driver
Implement the virtio-iommu driver following version 0.5 of the specification [1]. Previous version of this code was sent back in April [2], implementing the first public RFC. Since then there has been lots of progress and discussion on the specification side, and I think the driver is in a good shape now. The reason patches 1-3 are only RFC is that I'm waiting on feedback from the Virtio TC
2017 Nov 17
11
[RFC PATCH v2 0/5] Add virtio-iommu driver
Implement the virtio-iommu driver following version 0.5 of the specification [1]. Previous version of this code was sent back in April [2], implementing the first public RFC. Since then there has been lots of progress and discussion on the specification side, and I think the driver is in a good shape now. The reason patches 1-3 are only RFC is that I'm waiting on feedback from the Virtio TC
2018 Oct 12
3
[PATCH v3 5/7] iommu: Add virtio-iommu driver
...IO; > + > + region = iommu_alloc_resv_region(MSI_IOVA_BASE, MSI_IOVA_LENGTH, prot, > + IOMMU_RESV_SW_MSI); > + if (!region) > + return; > + > + list_add_tail(&region->list, head); > + iommu_dma_get_resv_regions(dev, head); > +} > + > +static void viommu_put_resv_regions(struct device *dev, struct list_head *head) > +{ > + struct iommu_resv_region *entry, *next; > + > + list_for_each_entry_safe(entry, next, head, list) > + kfree(entry); > +} > + > +static struct iommu_ops viommu_ops; > +static struct virtio_driver virtio_iommu_drv; >...
2018 Oct 12
3
[PATCH v3 5/7] iommu: Add virtio-iommu driver
...IO; > + > + region = iommu_alloc_resv_region(MSI_IOVA_BASE, MSI_IOVA_LENGTH, prot, > + IOMMU_RESV_SW_MSI); > + if (!region) > + return; > + > + list_add_tail(&region->list, head); > + iommu_dma_get_resv_regions(dev, head); > +} > + > +static void viommu_put_resv_regions(struct device *dev, struct list_head *head) > +{ > + struct iommu_resv_region *entry, *next; > + > + list_for_each_entry_safe(entry, next, head, list) > + kfree(entry); > +} > + > +static struct iommu_ops viommu_ops; > +static struct virtio_driver virtio_iommu_drv; >...
2018 Nov 22
0
[PATCH v5 5/7] iommu: Add virtio-iommu driver
...ion; + int prot = IOMMU_WRITE | IOMMU_NOEXEC | IOMMU_MMIO; + + region = iommu_alloc_resv_region(MSI_IOVA_BASE, MSI_IOVA_LENGTH, prot, + IOMMU_RESV_SW_MSI); + if (!region) + return; + + list_add_tail(&region->list, head); + iommu_dma_get_resv_regions(dev, head); +} + +static void viommu_put_resv_regions(struct device *dev, struct list_head *head) +{ + struct iommu_resv_region *entry, *next; + + list_for_each_entry_safe(entry, next, head, list) + kfree(entry); +} + +static struct iommu_ops viommu_ops; +static struct virtio_driver virtio_iommu_drv; + +static int viommu_match_node(struct device *de...
2018 Nov 15
0
[PATCH v4 5/7] iommu: Add virtio-iommu driver
...ion; + int prot = IOMMU_WRITE | IOMMU_NOEXEC | IOMMU_MMIO; + + region = iommu_alloc_resv_region(MSI_IOVA_BASE, MSI_IOVA_LENGTH, prot, + IOMMU_RESV_SW_MSI); + if (!region) + return; + + list_add_tail(&region->list, head); + iommu_dma_get_resv_regions(dev, head); +} + +static void viommu_put_resv_regions(struct device *dev, struct list_head *head) +{ + struct iommu_resv_region *entry, *next; + + list_for_each_entry_safe(entry, next, head, list) + kfree(entry); +} + +static struct iommu_ops viommu_ops; +static struct virtio_driver virtio_iommu_drv; + +static int viommu_match_node(struct device *de...
2018 Jun 21
0
[PATCH v2 2/5] iommu: Add virtio-iommu driver
...ion; + int prot = IOMMU_WRITE | IOMMU_NOEXEC | IOMMU_MMIO; + + region = iommu_alloc_resv_region(MSI_IOVA_BASE, MSI_IOVA_LENGTH, prot, + IOMMU_RESV_SW_MSI); + if (!region) + return; + + list_add_tail(&region->list, head); + iommu_dma_get_resv_regions(dev, head); +} + +static void viommu_put_resv_regions(struct device *dev, struct list_head *head) +{ + struct iommu_resv_region *entry, *next; + + list_for_each_entry_safe(entry, next, head, list) + kfree(entry); +} + +static struct iommu_ops viommu_ops; +static struct virtio_driver virtio_iommu_drv; + +static int viommu_match_node(struct device *de...
2018 Oct 12
0
[PATCH v3 5/7] iommu: Add virtio-iommu driver
...ion; + int prot = IOMMU_WRITE | IOMMU_NOEXEC | IOMMU_MMIO; + + region = iommu_alloc_resv_region(MSI_IOVA_BASE, MSI_IOVA_LENGTH, prot, + IOMMU_RESV_SW_MSI); + if (!region) + return; + + list_add_tail(&region->list, head); + iommu_dma_get_resv_regions(dev, head); +} + +static void viommu_put_resv_regions(struct device *dev, struct list_head *head) +{ + struct iommu_resv_region *entry, *next; + + list_for_each_entry_safe(entry, next, head, list) + kfree(entry); +} + +static struct iommu_ops viommu_ops; +static struct virtio_driver virtio_iommu_drv; + +static int viommu_match_node(struct device *de...
2018 Feb 14
0
[PATCH 1/4] iommu: Add virtio-iommu driver
...ion; + int prot = IOMMU_WRITE | IOMMU_NOEXEC | IOMMU_MMIO; + + region = iommu_alloc_resv_region(MSI_IOVA_BASE, MSI_IOVA_LENGTH, prot, + IOMMU_RESV_SW_MSI); + if (!region) + return; + + list_add_tail(&region->list, head); + iommu_dma_get_resv_regions(dev, head); +} + +static void viommu_put_resv_regions(struct device *dev, struct list_head *head) +{ + struct iommu_resv_region *entry, *next; + + list_for_each_entry_safe(entry, next, head, list) + kfree(entry); +} + +static struct iommu_ops viommu_ops = { + .capable = viommu_capable, + .domain_alloc = viommu_domain_alloc, + .domain_free = viomm...