search for: out_iov

Displaying 11 results from an estimated 11 matches for "out_iov".

2008 Apr 05
11
[PATCH RFC 1/5] vringfd syscall
...+ put_filp(filp); +put_fd: + put_unused_fd(fd); +out: + return err; +} + +/* Returns an error, or 0 (no buffers), or an id for vring_used_buffer() */ +int vring_get_buffer(struct vring_info *vr, + struct iovec *in_iov, + unsigned int *num_in, unsigned long *in_len, + struct iovec *out_iov, + unsigned int *num_out, unsigned long *out_len) +{ + unsigned int i, in = 0, out = 0; + unsigned long dummy; + u16 head; + struct vring_desc d; + + if (unlikely(get_user(head, &vr->ring.avail->idx) != 0)) + return -EFAULT; + + if (vr->last_avail == head) + return 0; + + if (!...
2008 Apr 05
11
[PATCH RFC 1/5] vringfd syscall
...+ put_filp(filp); +put_fd: + put_unused_fd(fd); +out: + return err; +} + +/* Returns an error, or 0 (no buffers), or an id for vring_used_buffer() */ +int vring_get_buffer(struct vring_info *vr, + struct iovec *in_iov, + unsigned int *num_in, unsigned long *in_len, + struct iovec *out_iov, + unsigned int *num_out, unsigned long *out_len) +{ + unsigned int i, in = 0, out = 0; + unsigned long dummy; + u16 head; + struct vring_desc d; + + if (unlikely(get_user(head, &vr->ring.avail->idx) != 0)) + return -EFAULT; + + if (vr->last_avail == head) + return 0; + + if (!...
2018 Nov 06
0
[PATCH 1/1] Add vhost_blk driver
...+ VHOST_BLK_VQ_MAX = 16, > + VHOST_BLK_VQ_MAX_REQS = 128, > +}; These limits seem arbitrary and probably too low. > + > +struct vhost_blk_req { > + struct llist_node list; > + int index; > + struct vhost_blk_queue *q; > + struct virtio_blk_outhdr hdr; > + struct iovec *out_iov; > + struct iovec *in_iov; > + u8 out_num; > + u8 in_num; > + long len; > + struct kiocb iocb; > + struct iov_iter i; > + int res; > + void __user *status; > +}; > + > +struct vhost_blk_queue { > + int index; > + struct vhost_blk *blk; > + struct vhost_virt...
2023 Apr 07
2
[PATCH 0/2] vdpa_sim_blk: support shared backend
This series is mainly for testing live migration between 2 vdpa_sim_blk devices. The first patch is preparation and moves the buffer allocation into devices, the second patch adds the `shared_buffer_mutex` parameter to vdpa_sim_blk to use the same ramdisk for all devices. Tested with QEMU v8.0.0-rc2 in this way: modprobe vhost_vdpa modprobe vdpa_sim_blk shared_backend=true vdpa dev add mgmtdev
2018 Nov 02
0
[PATCH 1/1] Add vhost_blk driver
...OW(VHOST_VIRTIO, 0x50, int) > + > +enum { > + VHOST_BLK_VQ_MAX = 16, > + VHOST_BLK_VQ_MAX_REQS = 128, > +}; > + > +struct vhost_blk_req { > + struct llist_node list; > + int index; > + struct vhost_blk_queue *q; > + struct virtio_blk_outhdr hdr; > + struct iovec *out_iov; > + struct iovec *in_iov; > + u8 out_num; > + u8 in_num; > + long len; > + struct kiocb iocb; > + struct iov_iter i; > + int res; > + void __user *status; > +}; > + > +struct vhost_blk_queue { > + int index; > + struct vhost_blk *blk; > + struct vhost_virt...
2018 Nov 03
0
[PATCH 1/1] Add vhost_blk driver
...154 __func__, current->pid, current->comm, 155 write ? "WRITE" : "READ", req->hdr.sector, len); 156 157 req->len = len; 158 rem_len = len; 159 iov_iter_init(&req->i, (write ? WRITE : READ), 160 write ? &req->out_iov[0] : &req->in_iov[0], 161 nr_seg, len); 162 163 req->iocb.ki_pos = sector << 9; 164 req->iocb.ki_filp = blk->backend; 165 req->iocb.ki_complete = vhost_blk_iocb_complete; 166 req->iocb.ki_flags = IOCB_DIRECT; 167 168 if (write...
2023 Mar 21
3
[PATCH v3 5/8] vdpa_sim: make devices agnostic for work management
Let's move work management inside the vdpa_sim core. This way we can easily change how we manage the works, without having to change the devices each time. Acked-by: Eugenio P??rez Martin <eperezma at redhat.com> Acked-by: Jason Wang <jasowang at redhat.com> Signed-off-by: Stefano Garzarella <sgarzare at redhat.com> --- drivers/vdpa/vdpa_sim/vdpa_sim.h | 3 ++-
2023 Mar 02
8
[PATCH v2 0/8] vdpa_sim: add support for user VA
v2: - rebased on Linus' tree, commit ae3419fbac84 ("vc_screen: don't clobber return value in vcs_read") - removed `struct task_struct *owner` param (unused for now, maybe ?useful to support cgroups) [Jason] - add unbind_mm callback [Jason] - call the new unbind_mm callback during the release [Jason] - avoid to call bind_mm callback after the reset, since the device ?is not
2023 Apr 04
9
[PATCH v5 0/9] vdpa_sim: add support for user VA
This series adds support for the use of user virtual addresses in the vDPA simulator devices. The main reason for this change is to lift the pinning of all guest memory. Especially with virtio devices implemented in software. The next step would be to generalize the code in vdpa-sim to allow the implementation of in-kernel software devices. Similar to vhost, but using vDPA so we can reuse the
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