search for: viommu_prob

Displaying 20 results from an estimated 81 matches for "viommu_prob".

Did you mean: viommu_probe
2019 Jul 22
3
[PATCH] iommu/virtio: Update to most recent specification
...ot & IOMMU_WRITE ? VIRTIO_IOMMU_MAP_F_WRITE : 0) | (prot & IOMMU_MMIO ? VIRTIO_IOMMU_MAP_F_MMIO : 0); + if (flags & ~vdomain->map_flags) + return -EINVAL; + ret = viommu_add_mapping(vdomain, iova, paddr, size, flags); if (ret) return ret; @@ -1027,7 +1036,8 @@ static int viommu_probe(struct virtio_device *vdev) goto err_free_vqs; } - viommu->domain_bits = 32; + viommu->map_flags = VIRTIO_IOMMU_MAP_F_READ | VIRTIO_IOMMU_MAP_F_WRITE; + viommu->last_domain = ~0U; /* Optional features */ virtio_cread_feature(vdev, VIRTIO_IOMMU_F_INPUT_RANGE, @@ -1038,9 +1048,...
2019 Jul 22
3
[PATCH] iommu/virtio: Update to most recent specification
...ot & IOMMU_WRITE ? VIRTIO_IOMMU_MAP_F_WRITE : 0) | (prot & IOMMU_MMIO ? VIRTIO_IOMMU_MAP_F_MMIO : 0); + if (flags & ~vdomain->map_flags) + return -EINVAL; + ret = viommu_add_mapping(vdomain, iova, paddr, size, flags); if (ret) return ret; @@ -1027,7 +1036,8 @@ static int viommu_probe(struct virtio_device *vdev) goto err_free_vqs; } - viommu->domain_bits = 32; + viommu->map_flags = VIRTIO_IOMMU_MAP_F_READ | VIRTIO_IOMMU_MAP_F_WRITE; + viommu->last_domain = ~0U; /* Optional features */ virtio_cread_feature(vdev, VIRTIO_IOMMU_F_INPUT_RANGE, @@ -1038,9 +1048,...
2019 Jul 22
0
[PATCH] iommu/virtio: Update to most recent specification
...TE : 0) | > (prot & IOMMU_MMIO ? VIRTIO_IOMMU_MAP_F_MMIO : 0); > > + if (flags & ~vdomain->map_flags) > + return -EINVAL; > + > ret = viommu_add_mapping(vdomain, iova, paddr, size, flags); > if (ret) > return ret; > @@ -1027,7 +1036,8 @@ static int viommu_probe(struct virtio_device *vdev) > goto err_free_vqs; > } > > - viommu->domain_bits = 32; > + viommu->map_flags = VIRTIO_IOMMU_MAP_F_READ | VIRTIO_IOMMU_MAP_F_WRITE; > + viommu->last_domain = ~0U; > > /* Optional features */ > virtio_cread_feature(vdev,...
2019 Jul 22
0
[PATCH] iommu/virtio: Update to most recent specification
...TE : 0) | > (prot & IOMMU_MMIO ? VIRTIO_IOMMU_MAP_F_MMIO : 0); > > + if (flags & ~vdomain->map_flags) > + return -EINVAL; > + > ret = viommu_add_mapping(vdomain, iova, paddr, size, flags); > if (ret) > return ret; > @@ -1027,7 +1036,8 @@ static int viommu_probe(struct virtio_device *vdev) > goto err_free_vqs; > } > > - viommu->domain_bits = 32; > + viommu->map_flags = VIRTIO_IOMMU_MAP_F_READ | VIRTIO_IOMMU_MAP_F_WRITE; > + viommu->last_domain = ~0U; > > /* Optional features */ > virtio_cread_feature(vdev,...
2020 Aug 05
0
[PATCH v3 36/38] virtio-iommu: convert to LE accessors
...++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/iommu/virtio-iommu.c b/drivers/iommu/virtio-iommu.c index f6f07489a9aa..b4da396cce60 100644 --- a/drivers/iommu/virtio-iommu.c +++ b/drivers/iommu/virtio-iommu.c @@ -1010,8 +1010,8 @@ static int viommu_probe(struct virtio_device *vdev) if (ret) return ret; - virtio_cread(vdev, struct virtio_iommu_config, page_size_mask, - &viommu->pgsize_bitmap); + virtio_cread_le(vdev, struct virtio_iommu_config, page_size_mask, + &viommu->pgsize_bitmap); if (!viommu->pgsize_bitmap...
2018 Feb 21
2
[PATCH 1/4] iommu: Add virtio-iommu driver
...0x0): dangerous relocation: unsupported relocation arch/arm64/kernel/head.o: In function `__primary_switch': (.idmap.text+0x340): dangerous relocation: unsupported relocation (.idmap.text+0x348): dangerous relocation: unsupported relocation drivers/iommu/virtio-iommu.o: In function `viommu_probe': virtio-iommu.c:(.text+0xbdc): undefined reference to `virtio_check_driver_offered_feature' virtio-iommu.c:(.text+0xcfc): undefined reference to `virtio_check_driver_offered_feature' virtio-iommu.c:(.text+0xe10): undefined reference to `virtio_check_driver_offered_feature'...
2018 Feb 21
2
[PATCH 1/4] iommu: Add virtio-iommu driver
...0x0): dangerous relocation: unsupported relocation arch/arm64/kernel/head.o: In function `__primary_switch': (.idmap.text+0x340): dangerous relocation: unsupported relocation (.idmap.text+0x348): dangerous relocation: unsupported relocation drivers/iommu/virtio-iommu.o: In function `viommu_probe': virtio-iommu.c:(.text+0xbdc): undefined reference to `virtio_check_driver_offered_feature' virtio-iommu.c:(.text+0xcfc): undefined reference to `virtio_check_driver_offered_feature' virtio-iommu.c:(.text+0xe10): undefined reference to `virtio_check_driver_offered_feature'...
2018 Feb 14
12
[PATCH 0/4] Add virtio-iommu driver
Implement the virtio-iommu driver following version 0.6 of the specification [1]. Previous version, RFCv2, was sent in November [2]. This version addresses Eric's comments and changes the device number. (Since last week I also tested and fixed the probe/release functions, they now use devm properly.) I did not include ACPI support because the next IORT specifications isn't ready yet (even
2018 Feb 14
12
[PATCH 0/4] Add virtio-iommu driver
Implement the virtio-iommu driver following version 0.6 of the specification [1]. Previous version, RFCv2, was sent in November [2]. This version addresses Eric's comments and changes the device number. (Since last week I also tested and fixed the probe/release functions, they now use devm properly.) I did not include ACPI support because the next IORT specifications isn't ready yet (even
2018 Feb 14
0
[PATCH 3/4] iommu/virtio: Add event queue
..., req, GFP_ATOMIC); if (ret) break; list_add_tail(&req->list, &pending); } - if (i && !virtqueue_kick(viommu->vq)) + if (i && !virtqueue_kick(vq)) return -EPIPE; timeout = ktime_add_ms(ktime_get(), timeout_ms * i); @@ -553,6 +570,70 @@ static int viommu_probe_endpoint(struct viommu_dev *viommu, struct device *dev) return ret; } +static int viommu_fault_handler(struct viommu_dev *viommu, + struct virtio_iommu_fault *fault) +{ + char *reason_str; + + u8 reason = fault->reason; + u32 flags = le32_to_cpu(fault->flags); + u32 endpoint = le32_t...
2017 Nov 17
0
[RFC PATCH v2 3/5] iommu/virtio-iommu: Add event queue
..., req, GFP_ATOMIC); if (ret) break; list_add_tail(&req->list, &pending); } - if (i && !virtqueue_kick(viommu->vq)) + if (i && !virtqueue_kick(vq)) return -EPIPE; timeout = ktime_add_ms(ktime_get(), timeout_ms * i); @@ -554,6 +570,70 @@ static int viommu_probe_endpoint(struct viommu_dev *viommu, struct device *dev) return 0; } +static int viommu_fault_handler(struct viommu_dev *viommu, + struct virtio_iommu_fault *fault) +{ + char *reason_str; + + u8 reason = fault->reason; + u32 flags = le32_to_cpu(fault->flags); + u32 endpoint = le32_to_...
2018 Jan 16
1
[RFC PATCH v2 3/5] iommu/virtio-iommu: Add event queue
...> list_add_tail(&req->list, &pending); > } > > - if (i && !virtqueue_kick(viommu->vq)) > + if (i && !virtqueue_kick(vq)) > return -EPIPE; > > timeout = ktime_add_ms(ktime_get(), timeout_ms * i); > @@ -554,6 +570,70 @@ static int viommu_probe_endpoint(struct viommu_dev *viommu, struct device *dev) > return 0; > } > > +static int viommu_fault_handler(struct viommu_dev *viommu, > + struct virtio_iommu_fault *fault) > +{ > + char *reason_str; > + > + u8 reason = fault->reason; > + u32 flags = le32_...
2018 Nov 23
2
[PATCH v5 5/7] iommu: Add virtio-iommu driver
...> + > + ret = virtio_find_single_vq(vdev, NULL, name); > + if (IS_ERR(ret)) { > + dev_err(viommu->dev, "cannot find VQ\n"); > + return PTR_ERR(ret); > + } > + > + viommu->vqs[VIOMMU_REQUEST_VQ] = ret; > + > + return 0; > +} > + > +static int viommu_probe(struct virtio_device *vdev) > +{ > + struct device *parent_dev = vdev->dev.parent; > + struct viommu_dev *viommu = NULL; > + struct device *dev = &vdev->dev; > + u64 input_start = 0; > + u64 input_end = -1UL; > + int ret; > + > + if (!virtio_has_feature(vdev, V...
2018 Nov 23
2
[PATCH v5 5/7] iommu: Add virtio-iommu driver
...> + > + ret = virtio_find_single_vq(vdev, NULL, name); > + if (IS_ERR(ret)) { > + dev_err(viommu->dev, "cannot find VQ\n"); > + return PTR_ERR(ret); > + } > + > + viommu->vqs[VIOMMU_REQUEST_VQ] = ret; > + > + return 0; > +} > + > +static int viommu_probe(struct virtio_device *vdev) > +{ > + struct device *parent_dev = vdev->dev.parent; > + struct viommu_dev *viommu = NULL; > + struct device *dev = &vdev->dev; > + u64 input_start = 0; > + u64 input_end = -1UL; > + int ret; > + > + if (!virtio_has_feature(vdev, V...
2018 Feb 22
0
[PATCH 1/4] iommu: Add virtio-iommu driver
...relocation Is this related? > arch/arm64/kernel/head.o: In function `__primary_switch': > (.idmap.text+0x340): dangerous relocation: unsupported relocation > (.idmap.text+0x348): dangerous relocation: unsupported relocation > drivers/iommu/virtio-iommu.o: In function `viommu_probe': > virtio-iommu.c:(.text+0xbdc): undefined reference to `virtio_check_driver_offered_feature' > virtio-iommu.c:(.text+0xcfc): undefined reference to `virtio_check_driver_offered_feature' > virtio-iommu.c:(.text+0xe10): undefined reference to `virtio_check_driver_offe...
2018 Nov 27
0
[PATCH v5 5/7] iommu: Add virtio-iommu driver
...tio. >> + >> + Say Y here if you intend to run this kernel as a guest. >> + > > Given it is arm specific right now, shouldn't this depend on ARM? > E.g. there's a hack for x86 right now. Sure, I'll make it depend on ARM64 for now [..] >> +static int viommu_probe(struct virtio_device *vdev) >> +{ >> + struct device *parent_dev = vdev->dev.parent; >> + struct viommu_dev *viommu = NULL; >> + struct device *dev = &vdev->dev; >> + u64 input_start = 0; >> + u64 input_end = -1UL; >> + int ret; >> + >&g...
2020 Feb 14
2
[PATCH] iommu/virtio: Build virtio-iommu as module
...depends on VIRTIO depends on (ARM64 || X86) select IOMMU_API select IOMMU_DMA diff --git a/drivers/iommu/virtio-iommu.c b/drivers/iommu/virtio-iommu.c index f18ba8e22ebd..5429c12c879b 100644 --- a/drivers/iommu/virtio-iommu.c +++ b/drivers/iommu/virtio-iommu.c @@ -1084,7 +1084,6 @@ static int viommu_probe(struct virtio_device *vdev) #ifdef CONFIG_PCI if (pci_bus_type.iommu_ops != &viommu_ops) { - pci_request_acs(); ret = bus_set_iommu(&pci_bus_type, &viommu_ops); if (ret) goto err_unregister; -- 2.25.0
2020 Feb 14
2
[PATCH] iommu/virtio: Build virtio-iommu as module
...depends on VIRTIO depends on (ARM64 || X86) select IOMMU_API select IOMMU_DMA diff --git a/drivers/iommu/virtio-iommu.c b/drivers/iommu/virtio-iommu.c index f18ba8e22ebd..5429c12c879b 100644 --- a/drivers/iommu/virtio-iommu.c +++ b/drivers/iommu/virtio-iommu.c @@ -1084,7 +1084,6 @@ static int viommu_probe(struct virtio_device *vdev) #ifdef CONFIG_PCI if (pci_bus_type.iommu_ops != &viommu_ops) { - pci_request_acs(); ret = bus_set_iommu(&pci_bus_type, &viommu_ops); if (ret) goto err_unregister; -- 2.25.0
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