Displaying 20 results from an estimated 68 matches for "aperture_start".
2018 Jan 16
2
[RFC PATCH v2 2/5] iommu/virtio-iommu: Add probe request
...ging to the IOAPIC regions to map phys addr and this stalled qemu
with a drown trace:
"virtio: bogus descriptor or out of resources"
those regions need to be excluded from the iova allocator. This was
resolved by adding
if (iommu_dma_init_domain(domain,
vdev->viommu->geometry.aperture_start,
vdev->viommu->geometry.aperture_end,
dev))
in viommu_attach_dev()
Thanks
Eric
> + break;
> + }
> +
> + list_add(&vdev->resv_regions, ®ion->list);
> +
> + if (mem->subtype != VIRTIO_IOMMU_RESV_MEM_T_RESERVED &&
> + mem->subt...
2018 Jan 16
2
[RFC PATCH v2 2/5] iommu/virtio-iommu: Add probe request
...ging to the IOAPIC regions to map phys addr and this stalled qemu
with a drown trace:
"virtio: bogus descriptor or out of resources"
those regions need to be excluded from the iova allocator. This was
resolved by adding
if (iommu_dma_init_domain(domain,
vdev->viommu->geometry.aperture_start,
vdev->viommu->geometry.aperture_end,
dev))
in viommu_attach_dev()
Thanks
Eric
> + break;
> + }
> +
> + list_add(&vdev->resv_regions, ®ion->list);
> +
> + if (mem->subtype != VIRTIO_IOMMU_RESV_MEM_T_RESERVED &&
> + mem->subt...
2020 Aug 05
2
[PATCH 4/4] vhost: vdpa: report iova range
...nge range;
> + struct vdpa_iova_range vdpa_range;
> +
> + if (!ops->set_map && !ops->dma_map) {
Why not just check if (ops->get_iova_range) directly?
> + iommu_domain_get_attr(v->domain,
> + DOMAIN_ATTR_GEOMETRY, &geo);
> + range.start = geo.aperture_start;
> + range.end = geo.aperture_end;
> + } else {
> + vdpa_range = ops->get_iova_range(vdpa);
> + range.start = vdpa_range.start;
> + range.end = vdpa_range.end;
> + }
> +
> + return copy_to_user(argp, &range, sizeof(range));
> +
> +}
> +
> static long...
2020 Aug 05
2
[PATCH 4/4] vhost: vdpa: report iova range
...nge range;
> + struct vdpa_iova_range vdpa_range;
> +
> + if (!ops->set_map && !ops->dma_map) {
Why not just check if (ops->get_iova_range) directly?
> + iommu_domain_get_attr(v->domain,
> + DOMAIN_ATTR_GEOMETRY, &geo);
> + range.start = geo.aperture_start;
> + range.end = geo.aperture_end;
> + } else {
> + vdpa_range = ops->get_iova_range(vdpa);
> + range.start = vdpa_range.start;
> + range.end = vdpa_range.end;
> + }
> +
> + return copy_to_user(argp, &range, sizeof(range));
> +
> +}
> +
> static long...
2020 Aug 11
2
[PATCH 1/4] vdpa: introduce config op to get valid iova range
On 2020/8/10 ??8:05, Michael S. Tsirkin wrote:
> On Thu, Aug 06, 2020 at 03:43:54PM +0300, Eli Cohen wrote:
>> On Thu, Aug 06, 2020 at 08:29:22AM -0400, Michael S. Tsirkin wrote:
>>> On Thu, Aug 06, 2020 at 03:03:55PM +0300, Eli Cohen wrote:
>>>> On Wed, Aug 05, 2020 at 08:51:56AM -0400, Michael S. Tsirkin wrote:
>>>>> On Wed, Jun 17, 2020 at 11:29:44AM
2020 Aug 11
2
[PATCH 1/4] vdpa: introduce config op to get valid iova range
On 2020/8/10 ??8:05, Michael S. Tsirkin wrote:
> On Thu, Aug 06, 2020 at 03:43:54PM +0300, Eli Cohen wrote:
>> On Thu, Aug 06, 2020 at 08:29:22AM -0400, Michael S. Tsirkin wrote:
>>> On Thu, Aug 06, 2020 at 03:03:55PM +0300, Eli Cohen wrote:
>>>> On Wed, Aug 05, 2020 at 08:51:56AM -0400, Michael S. Tsirkin wrote:
>>>>> On Wed, Jun 17, 2020 at 11:29:44AM
2017 Apr 07
0
[RFC PATCH linux] iommu: Add virtio-iommu driver
...+ struct device *dev;
+ struct virtio_device *vdev;
+
+ struct virtqueue *vq;
+ struct list_head pending_requests;
+ /* Serialize anything touching the vq and the request list */
+ spinlock_t vq_lock;
+
+ struct list_head list;
+
+ /* Device configuration */
+ u64 pgsize_bitmap;
+ u64 aperture_start;
+ u64 aperture_end;
+};
+
+struct viommu_mapping {
+ phys_addr_t paddr;
+ struct interval_tree_node iova;
+};
+
+struct viommu_domain {
+ struct iommu_domain domain;
+ struct viommu_dev *viommu;
+ struct mutex mutex;
+ u64 id;
+
+ spinlock_t mappings_lock;
+ struct rb_root mappings...
2018 Jan 19
0
[RFC PATCH v2 2/5] iommu/virtio-iommu: Add probe request
...ddr and this stalled qemu
> with a drown trace:
>
> "virtio: bogus descriptor or out of resources"
>
> those regions need to be excluded from the iova allocator. This was
> resolved by adding
> if (iommu_dma_init_domain(domain,
> vdev->viommu->geometry.aperture_start,
> vdev->viommu->geometry.aperture_end,
> dev))
> in viommu_attach_dev()
The most recent hack for x86 [1] does call iommu_dma_init_domain() in
attach_dev(). Is it buggy?
We probably shouldn't call iommu_dma_init_domain() unconditionally
(outside of CONFIG_X86 that is)...
2020 Jun 17
0
[PATCH 4/4] vhost: vdpa: report iova range
...>vdpa;
+ const struct vdpa_config_ops *ops = vdpa->config;
+ struct vhost_vdpa_iova_range range;
+ struct vdpa_iova_range vdpa_range;
+
+ if (!ops->set_map && !ops->dma_map) {
+ iommu_domain_get_attr(v->domain,
+ DOMAIN_ATTR_GEOMETRY, &geo);
+ range.start = geo.aperture_start;
+ range.end = geo.aperture_end;
+ } else {
+ vdpa_range = ops->get_iova_range(vdpa);
+ range.start = vdpa_range.start;
+ range.end = vdpa_range.end;
+ }
+
+ return copy_to_user(argp, &range, sizeof(range));
+
+}
+
static long vhost_vdpa_vring_ioctl(struct vhost_vdpa *v, unsigned int cm...
2020 Aug 05
0
[PATCH v3 36/38] virtio-iommu: convert to LE accessors
...O_IOMMU_F_PROBE,
- struct virtio_iommu_config, probe_size,
- &viommu->probe_size);
+ virtio_cread_le_feature(vdev, VIRTIO_IOMMU_F_PROBE,
+ struct virtio_iommu_config, probe_size,
+ &viommu->probe_size);
viommu->geometry = (struct iommu_domain_geometry) {
.aperture_start = input_start,
--
MST
2020 Aug 05
1
[PATCH 3/4] vdpa: get_iova_range() is mandatory for device specific DMA translation
On Wed, Jun 17, 2020 at 11:29:46AM +0800, Jason Wang wrote:
> In order to let userspace work correctly, get_iova_range() is a must
> for the device that has its own DMA translation logic.
I guess you mean for a device.
However in absence of ths op, I don't see what is wrong with just
assuming device can access any address.
>
> Signed-off-by: Jason Wang <jasowang at
2020 Aug 11
0
[PATCH 1/4] vdpa: introduce config op to get valid iova range
...arguably easier to get wrong than
> > getting the size if you need it.
>
>
> Yes, so do you still prefer first/last or just begin/end which is consistent
> with iommu_domain_geometry?
>
> Thanks
I prefer first/last I think, these are unambiguous.
E.g.
dma_addr_t aperture_start; /* First address that can be mapped */
dma_addr_t aperture_end; /* Last address that can be mapped */
instead of addressing ambiguity with a comment, let's just name the field well.
>
> >
2020 Aug 31
0
[PATCH V2 2/3] vhost: vdpa: report iova range
...>get_iova_range) {
>> + *range = ops->get_iova_range(vdpa);
>> + } else if (v->domain &&
>> + !iommu_domain_get_attr(v->domain,
>> + DOMAIN_ATTR_GEOMETRY, &geo) &&
>> + geo.force_aperture) {
>> + range->first = geo.aperture_start;
>> + range->last = geo.aperture_end;
>> + } else {
>> + range->first = 0;
>> + range->last = ULLONG_MAX;
>> + }
> Shouldn't we require drivers that publish VIRTIO_F_ACCESS_PLATFORM to
> implement get_iova_range?
Probably not, since ACCESS_PLATF...
2020 Aug 06
0
[PATCH 4/4] vhost: vdpa: report iova range
...a hint that the device has its own DMA
translation logic.
Device without get_iova_range does not necessarily meant it use IOMMU
driver.
Thanks
>
>
>
>
>> + iommu_domain_get_attr(v->domain,
>> + DOMAIN_ATTR_GEOMETRY, &geo);
>> + range.start = geo.aperture_start;
>> + range.end = geo.aperture_end;
>> + } else {
>> + vdpa_range = ops->get_iova_range(vdpa);
>> + range.start = vdpa_range.start;
>> + range.end = vdpa_range.end;
>> + }
>> +
>> + return copy_to_user(argp, &range, sizeof(range));
>>...
2020 Jun 17
12
[PATCH 0/4] vDPA: API for reporting IOVA range
Hi All:
This series introduces API for reporing IOVA range. This is a must for
userspace to work correclty:
- for the process that uses vhost-vDPA directly to properly allocate
IOVA
- for VM(qemu), when vIOMMU is not enabled, fail early if GPA is out
of range
- for VM(qemu), when vIOMMU is enabled, determine a valid guest
address width
Please review.
Thanks
Jason Wang (4):
vdpa:
2020 Jun 17
12
[PATCH 0/4] vDPA: API for reporting IOVA range
Hi All:
This series introduces API for reporing IOVA range. This is a must for
userspace to work correclty:
- for the process that uses vhost-vDPA directly to properly allocate
IOVA
- for VM(qemu), when vIOMMU is not enabled, fail early if GPA is out
of range
- for VM(qemu), when vIOMMU is enabled, determine a valid guest
address width
Please review.
Thanks
Jason Wang (4):
vdpa:
2017 Jun 16
1
[virtio-dev] [RFC PATCH linux] iommu: Add virtio-iommu driver
...> +
> + struct virtqueue *vq;
> + struct list_head pending_requests;
> + /* Serialize anything touching the vq and the request list */
> + spinlock_t vq_lock;
> +
> + struct list_head list;
> +
> + /* Device configuration */
> + u64 pgsize_bitmap;
> + u64 aperture_start;
> + u64 aperture_end;
> +};
> +
> +struct viommu_mapping {
> + phys_addr_t paddr;
> + struct interval_tree_node iova;
> +};
> +
> +struct viommu_domain {
> + struct iommu_domain domain;
> + struct viommu_dev *viommu;
> + struct mutex mutex;
> + u64...
2017 Jun 16
1
[virtio-dev] [RFC PATCH linux] iommu: Add virtio-iommu driver
...> +
> + struct virtqueue *vq;
> + struct list_head pending_requests;
> + /* Serialize anything touching the vq and the request list */
> + spinlock_t vq_lock;
> +
> + struct list_head list;
> +
> + /* Device configuration */
> + u64 pgsize_bitmap;
> + u64 aperture_start;
> + u64 aperture_end;
> +};
> +
> +struct viommu_mapping {
> + phys_addr_t paddr;
> + struct interval_tree_node iova;
> +};
> +
> +struct viommu_domain {
> + struct iommu_domain domain;
> + struct viommu_dev *viommu;
> + struct mutex mutex;
> + u64...
2018 Nov 15
1
[PATCH v3 6/7] iommu/virtio: Add probe request
...fig, domain_bits,
> &viommu->domain_bits);
>
> + virtio_cread_feature(vdev, VIRTIO_IOMMU_F_PROBE,
> + struct virtio_iommu_config, probe_size,
> + &viommu->probe_size);
> +
> viommu->geometry = (struct iommu_domain_geometry) {
> .aperture_start = input_start,
> .aperture_end = input_end,
> @@ -913,6 +1047,7 @@ static unsigned int features[] = {
> VIRTIO_IOMMU_F_MAP_UNMAP,
> VIRTIO_IOMMU_F_DOMAIN_BITS,
> VIRTIO_IOMMU_F_INPUT_RANGE,
> + VIRTIO_IOMMU_F_PROBE,
> };
>
> static struct virtio_device_id id_...
2024 Aug 12
2
[PATCH 1/3] drm/nouveau/tegra: Use iommu_paging_domain_alloc()
In nvkm_device_tegra_probe_iommu(), a paging domain is allocated for @dev
and attached to it on success. Use iommu_paging_domain_alloc() to make it
explicit.
Signed-off-by: Lu Baolu <baolu.lu at linux.intel.com>
Link: https://lore.kernel.org/r/20240610085555.88197-7-baolu.lu at linux.intel.com
---
drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c | 4 ++--
1 file changed, 2 insertions(+),