Displaying 8 results from an estimated 8 matches for "viommu_map_sg".
Did you mean:
iommu_map_sg
2017 Oct 09
0
[virtio-dev] [RFC] virtio-iommu version 0.4
...ap) {
+ .head.type = VIRTIO_IOMMU_T_UNMAP,
+ .address_space = cpu_to_le32(vdomain->id),
+ .virt_addr = cpu_to_le64(iova),
+ .size = cpu_to_le64(unmapped),
+ };
+
+ ret = viommu_send_req_sync(vdomain->viommu, req);
+ kfree(req);
if (ret)
return 0;
@@ -626,12 +647,16 @@ static size_t viommu_map_sg(struct iommu_domain *domain, unsigned long iova,
unsigned long mapped_iova;
size_t top_size, bottom_size;
struct viommu_request reqs[nents];
- struct virtio_iommu_req_map map_reqs[nents];
+ struct virtio_iommu_req_map *map_reqs;
struct viommu_domain *vdomain = to_viommu_domain(domain);
i...
2017 Apr 07
0
[RFC PATCH linux] iommu: Add virtio-iommu driver
...f (!vdomain->attached)
+ return size;
+
+ unmapped = viommu_tlb_unmap(vdomain, iova, size);
+ if (unmapped < size)
+ return 0;
+
+ req.size = cpu_to_le64(unmapped);
+
+ ret = viommu_send_req_sync(vdomain->viommu, &req);
+ if (ret)
+ return 0;
+
+ return unmapped;
+}
+
+static size_t viommu_map_sg(struct iommu_domain *domain, unsigned long iova,
+ struct scatterlist *sg, unsigned int nents, int prot)
+{
+ int i, ret;
+ int nr_sent;
+ size_t mapped;
+ size_t min_pagesz;
+ size_t total_size;
+ struct scatterlist *s;
+ unsigned int flags = 0;
+ unsigned long cur_iova;
+ unsigned long mapp...
2017 Jun 16
1
[virtio-dev] [RFC PATCH linux] iommu: Add virtio-iommu driver
...lb_unmap(vdomain, iova, size);
> + if (unmapped < size)
> + return 0;
> +
> + req.size = cpu_to_le64(unmapped);
> +
> + ret = viommu_send_req_sync(vdomain->viommu, &req);
> + if (ret)
> + return 0;
> +
> + return unmapped;
> +}
> +
> +static size_t viommu_map_sg(struct iommu_domain *domain, unsigned
> long iova,
> + struct scatterlist *sg, unsigned int nents, int prot) {
> + int i, ret;
> + int nr_sent;
> + size_t mapped;
> + size_t min_pagesz;
> + size_t total_size;
> + struct scatterlist *s;
> + unsigned int flags = 0;
&g...
2017 Jun 16
1
[virtio-dev] [RFC PATCH linux] iommu: Add virtio-iommu driver
...lb_unmap(vdomain, iova, size);
> + if (unmapped < size)
> + return 0;
> +
> + req.size = cpu_to_le64(unmapped);
> +
> + ret = viommu_send_req_sync(vdomain->viommu, &req);
> + if (ret)
> + return 0;
> +
> + return unmapped;
> +}
> +
> +static size_t viommu_map_sg(struct iommu_domain *domain, unsigned
> long iova,
> + struct scatterlist *sg, unsigned int nents, int prot) {
> + int i, ret;
> + int nr_sent;
> + size_t mapped;
> + size_t min_pagesz;
> + size_t total_size;
> + struct scatterlist *s;
> + unsigned int flags = 0;
&g...
2017 Aug 04
7
[RFC] virtio-iommu version 0.4
This is the continuation of my proposal for virtio-iommu, the para-
virtualized IOMMU. Here is a summary of the changes since last time [1]:
* The virtio-iommu document now resembles an actual specification. It is
split into a formal description of the virtio device, and implementation
notes. Please find sources and binaries at [2].
* Added a probe request to describe to the guest different
2017 Aug 04
7
[RFC] virtio-iommu version 0.4
This is the continuation of my proposal for virtio-iommu, the para-
virtualized IOMMU. Here is a summary of the changes since last time [1]:
* The virtio-iommu document now resembles an actual specification. It is
split into a formal description of the virtio device, and implementation
notes. Please find sources and binaries at [2].
* Added a probe request to describe to the guest different
2017 Apr 07
34
[RFC 0/3] virtio-iommu: a paravirtualized IOMMU
This is the initial proposal for a paravirtualized IOMMU device using
virtio transport. It contains a description of the device, a Linux driver,
and a toy implementation in kvmtool. With this prototype, you can
translate DMA to guest memory from emulated (virtio), or passed-through
(VFIO) devices.
In its simplest form, implemented here, the device handles map/unmap
requests from the guest. Future
2017 Apr 07
34
[RFC 0/3] virtio-iommu: a paravirtualized IOMMU
This is the initial proposal for a paravirtualized IOMMU device using
virtio transport. It contains a description of the device, a Linux driver,
and a toy implementation in kvmtool. With this prototype, you can
translate DMA to guest memory from emulated (virtio), or passed-through
(VFIO) devices.
In its simplest form, implemented here, the device handles map/unmap
requests from the guest. Future