Displaying 5 results from an estimated 5 matches for "nr_expected".
2017 Apr 07
0
[RFC PATCH linux] iommu: Add virtio-iommu driver
...e = sizeof(r.detach);
+ break;
+ case VIRTIO_IOMMU_T_MAP:
+ size = sizeof(r.map);
+ break;
+ case VIRTIO_IOMMU_T_UNMAP:
+ size = sizeof(r.unmap);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ *head = size - *tail;
+ return 0;
+}
+
+static int viommu_receive_resp(struct viommu_dev *viommu, int nr_expected)
+{
+
+ unsigned int len;
+ int nr_received = 0;
+ struct viommu_request *req, *pending, *next;
+
+ pending = list_first_entry_or_null(&viommu->pending_requests,
+ struct viommu_request, list);
+ if (WARN_ON(!pending))
+ return 0;
+
+ while ((req = virtqueue_get_buf(viommu->vq, &a...
2017 Jun 16
1
[virtio-dev] [RFC PATCH linux] iommu: Add virtio-iommu driver
...zeof(r.map);
> + break;
> + case VIRTIO_IOMMU_T_UNMAP:
> + size = sizeof(r.unmap);
> + break;
> + default:
> + return -EINVAL;
> + }
> +
> + *head = size - *tail;
> + return 0;
> +}
> +
> +static int viommu_receive_resp(struct viommu_dev *viommu, int
> +nr_expected) {
> +
> + unsigned int len;
> + int nr_received = 0;
> + struct viommu_request *req, *pending, *next;
> +
> + pending = list_first_entry_or_null(&viommu->pending_requests,
> + struct viommu_request, list);
> + if (WARN_ON(!pending))
> + return 0;
> +
&g...
2017 Jun 16
1
[virtio-dev] [RFC PATCH linux] iommu: Add virtio-iommu driver
...zeof(r.map);
> + break;
> + case VIRTIO_IOMMU_T_UNMAP:
> + size = sizeof(r.unmap);
> + break;
> + default:
> + return -EINVAL;
> + }
> +
> + *head = size - *tail;
> + return 0;
> +}
> +
> +static int viommu_receive_resp(struct viommu_dev *viommu, int
> +nr_expected) {
> +
> + unsigned int len;
> + int nr_received = 0;
> + struct viommu_request *req, *pending, *next;
> +
> + pending = list_first_entry_or_null(&viommu->pending_requests,
> + struct viommu_request, list);
> + if (WARN_ON(!pending))
> + return 0;
> +
&g...
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