search for: vhost_vring_fil

Displaying 20 results from an estimated 156 matches for "vhost_vring_fil".

Did you mean: vhost_vring_file
2020 Apr 26
1
[PATCH V2 1/2] vdpa: Support config interrupt in vhost_vdpa
...>>> @@ -18,6 +18,8 @@ >>> ? typedef void (*vhost_work_fn_t)(struct vhost_work *work); >>> ? ? #define VHOST_WORK_QUEUED 1 >>> +#define VHOST_FILE_UNBIND -1 >> >> >> I think it's better to document this in uapi. > > > I meant e.g in vhost_vring_file, we had a comment of unbinding: > > struct vhost_vring_file { > ??? unsigned int index; > ??? int fd; /* Pass -1 to unbind from file. */ > > }; I think it is better to use an int fd than vhost_vring_file, to avoid the confusions, so if we add#define VHOST_FILE_UNBIND -1 in the u...
2020 Apr 26
1
[PATCH 1/2] vdpa: Support config interrupt in vhost_vdpa
...L _IOW(VHOST_VIRTIO, 0x77, vhost_config_file) > #endif > diff --git a/include/uapi/linux/vhost_types.h b/include/uapi/linux/vhost_types.h > index 669457c..6759aefb 100644 > --- a/include/uapi/linux/vhost_types.h > +++ b/include/uapi/linux/vhost_types.h > @@ -27,6 +27,8 @@ struct vhost_vring_file { > > }; > > +typedef struct vhost_vring_file vhost_config_file; > + I wonder maybe this is the best approach. Maybe it's better to use vhost_vring_file or just use a int (but need document the -1 action). Thanks > struct vhost_vring_addr { > unsigned in...
2015 Dec 01
0
[PATCH V2 3/3] vhost_net: basic polling support
...mory = NULL; vq->is_le = virtio_legacy_is_little_endian(); vhost_vq_reset_user_be(vq); + vq->busyloop_timeout = 0; } static int vhost_worker(void *data) @@ -747,6 +748,7 @@ long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp) struct vhost_vring_state s; struct vhost_vring_file f; struct vhost_vring_addr a; + struct vhost_vring_busyloop_timeout t; u32 idx; long r; @@ -919,6 +921,19 @@ long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp) case VHOST_GET_VRING_ENDIAN: r = vhost_get_vring_endian(vq, idx, argp); break; + case VHOST_SET_VRI...
2020 Apr 26
3
[PATCH V2 1/2] vdpa: Support config interrupt in vhost_vdpa
On 2020/4/26 ??2:09, Zhu Lingshan wrote: > This commit implements config interrupt support in > vhost_vdpa layer. > > Signed-off-by: Zhu Lingshan <lingshan.zhu at intel.com> > --- > drivers/vhost/vdpa.c | 47 ++++++++++++++++++++++++++++++++++++++++++++++ > drivers/vhost/vhost.c | 2 +- > drivers/vhost/vhost.h | 2 ++ >
2020 Apr 26
3
[PATCH V2 1/2] vdpa: Support config interrupt in vhost_vdpa
On 2020/4/26 ??2:09, Zhu Lingshan wrote: > This commit implements config interrupt support in > vhost_vdpa layer. > > Signed-off-by: Zhu Lingshan <lingshan.zhu at intel.com> > --- > drivers/vhost/vdpa.c | 47 ++++++++++++++++++++++++++++++++++++++++++++++ > drivers/vhost/vhost.c | 2 +- > drivers/vhost/vhost.h | 2 ++ >
2016 Jan 20
3
[PATCH V2 3/3] vhost_net: basic polling support
...acy_is_little_endian(); > vhost_vq_reset_user_be(vq); > + vq->busyloop_timeout = 0; > } > > static int vhost_worker(void *data) > @@ -747,6 +748,7 @@ long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp) > struct vhost_vring_state s; > struct vhost_vring_file f; > struct vhost_vring_addr a; > + struct vhost_vring_busyloop_timeout t; > u32 idx; > long r; > > @@ -919,6 +921,19 @@ long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp) > case VHOST_GET_VRING_ENDIAN: > r = vhost_get_vring_endian(vq, id...
2016 Jan 20
3
[PATCH V2 3/3] vhost_net: basic polling support
...acy_is_little_endian(); > vhost_vq_reset_user_be(vq); > + vq->busyloop_timeout = 0; > } > > static int vhost_worker(void *data) > @@ -747,6 +748,7 @@ long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp) > struct vhost_vring_state s; > struct vhost_vring_file f; > struct vhost_vring_addr a; > + struct vhost_vring_busyloop_timeout t; > u32 idx; > long r; > > @@ -919,6 +921,19 @@ long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp) > case VHOST_GET_VRING_ENDIAN: > r = vhost_get_vring_endian(vq, id...
2015 Dec 01
5
[PATCH V2 0/3] basic busy polling support for vhost_net
Hi all: This series tries to add basic busy polling for vhost net. The idea is simple: at the end of tx/rx processing, busy polling for new tx added descriptor and rx receive socket for a while. The maximum number of time (in us) could be spent on busy polling was specified ioctl. Test A were done through: - 50 us as busy loop timeout - Netperf 2.6 - Two machines with back to back connected
2015 Dec 01
5
[PATCH V2 0/3] basic busy polling support for vhost_net
Hi all: This series tries to add basic busy polling for vhost net. The idea is simple: at the end of tx/rx processing, busy polling for new tx added descriptor and rx receive socket for a while. The maximum number of time (in us) could be spent on busy polling was specified ioctl. Test A were done through: - 50 us as busy loop timeout - Netperf 2.6 - Two machines with back to back connected
2020 Apr 26
0
[PATCH V2 1/2] vdpa: Support config interrupt in vhost_vdpa
...t.h >> +++ b/drivers/vhost/vhost.h >> @@ -18,6 +18,8 @@ >> ? typedef void (*vhost_work_fn_t)(struct vhost_work *work); >> ? ? #define VHOST_WORK_QUEUED 1 >> +#define VHOST_FILE_UNBIND -1 > > > I think it's better to document this in uapi. I meant e.g in vhost_vring_file, we had a comment of unbinding: struct vhost_vring_file { ??? unsigned int index; ??? int fd; /* Pass -1 to unbind from file. */ }; Thanks
2009 Nov 02
2
[PATCHv4 6/6] qemu-kvm: vhost-net implementation
...de "vhost_net.h" + +static int vhost_virtqueue_init(struct vhost_dev *dev, + struct VirtIODevice *vdev, + struct vhost_virtqueue *vq, + struct VirtQueue *q, + unsigned idx) +{ + target_phys_addr_t s, l; + int r; + struct vhost_vring_addr addr = { + .index = idx, + }; + struct vhost_vring_file file = { + .index = idx, + }; + struct vhost_vring_state size = { + .index = idx, + }; + + size.num = q->vring.num; + r = ioctl(dev->control, VHOST_SET_VRING_NUM, &size); + if (r) + return -errno; + + file.fd = vq->kick = eventfd(0, 0); + r = ioctl(dev->control, VHOST_SET_VRING_...
2009 Nov 02
2
[PATCHv4 6/6] qemu-kvm: vhost-net implementation
...de "vhost_net.h" + +static int vhost_virtqueue_init(struct vhost_dev *dev, + struct VirtIODevice *vdev, + struct vhost_virtqueue *vq, + struct VirtQueue *q, + unsigned idx) +{ + target_phys_addr_t s, l; + int r; + struct vhost_vring_addr addr = { + .index = idx, + }; + struct vhost_vring_file file = { + .index = idx, + }; + struct vhost_vring_state size = { + .index = idx, + }; + + size.num = q->vring.num; + r = ioctl(dev->control, VHOST_SET_VRING_NUM, &size); + if (r) + return -errno; + + file.fd = vq->kick = eventfd(0, 0); + r = ioctl(dev->control, VHOST_SET_VRING_...
2016 Apr 27
2
[RFC PATCH V2 2/2] vhost: device IOTLB API
...>umem_list); > - vhost_umem_interval_tree_insert(node, &newumem->umem_tree); > } > > if (!memory_access_ok(d, newumem, 0)) > @@ -782,6 +842,7 @@ long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp) > struct vhost_vring_state s; > struct vhost_vring_file f; > struct vhost_vring_addr a; > + struct vhost_vring_iotlb_entry e; > u32 idx; > long r; > > @@ -910,6 +971,35 @@ long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp) > } else > filep = eventfp; > break; > + case VHOST_SET_VRIN...
2016 Apr 27
2
[RFC PATCH V2 2/2] vhost: device IOTLB API
...>umem_list); > - vhost_umem_interval_tree_insert(node, &newumem->umem_tree); > } > > if (!memory_access_ok(d, newumem, 0)) > @@ -782,6 +842,7 @@ long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp) > struct vhost_vring_state s; > struct vhost_vring_file f; > struct vhost_vring_addr a; > + struct vhost_vring_iotlb_entry e; > u32 idx; > long r; > > @@ -910,6 +971,35 @@ long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp) > } else > filep = eventfp; > break; > + case VHOST_SET_VRIN...
2015 Jun 24
2
[PATCH RFC] vhost: add ioctl to query nregions upper limit
...ayout: see also VHOST_GET_MEM_MAX_NREGIONS below. */ #define VHOST_SET_MEM_TABLE _IOW(VHOST_VIRTIO, 0x03, struct vhost_memory) /* Write logging setup. */ @@ -127,6 +127,21 @@ struct vhost_memory { /* Set eventfd to signal an error */ #define VHOST_SET_VRING_ERR _IOW(VHOST_VIRTIO, 0x22, struct vhost_vring_file) +/* Query upper limit on nregions in VHOST_SET_MEM_TABLE arguments. + * Returns: + * 0 < value <= MAX_INT - gives the upper limit, higher values will fail + * 0 - there's no static limit: try and see if it works + * -1 - on failure + */ +#define VHOST_GET_MEM_MAX_NREGIONS _IO(VHO...
2015 Jun 24
2
[PATCH RFC] vhost: add ioctl to query nregions upper limit
...ayout: see also VHOST_GET_MEM_MAX_NREGIONS below. */ #define VHOST_SET_MEM_TABLE _IOW(VHOST_VIRTIO, 0x03, struct vhost_memory) /* Write logging setup. */ @@ -127,6 +127,21 @@ struct vhost_memory { /* Set eventfd to signal an error */ #define VHOST_SET_VRING_ERR _IOW(VHOST_VIRTIO, 0x22, struct vhost_vring_file) +/* Query upper limit on nregions in VHOST_SET_MEM_TABLE arguments. + * Returns: + * 0 < value <= MAX_INT - gives the upper limit, higher values will fail + * 0 - there's no static limit: try and see if it works + * -1 - on failure + */ +#define VHOST_GET_MEM_MAX_NREGIONS _IO(VHO...
2016 Apr 28
2
[RFC PATCH V2 2/2] vhost: device IOTLB API
...struct vhost_memory_region { > >> __u64 guest_phys_addr; > >> __u64 memory_size; /* bytes */ > >> @@ -127,6 +153,15 @@ struct vhost_memory { > >> /* Set eventfd to signal an error */ > >> #define VHOST_SET_VRING_ERR _IOW(VHOST_VIRTIO, 0x22, struct vhost_vring_file) > >> > >> +/* IOTLB */ > >> +/* Specify an eventfd file descriptor to signle on IOTLB miss */ > > typo > > Will fix it. > > > > >> +#define VHOST_SET_VRING_IOTLB_CALL _IOW(VHOST_VIRTIO, 0x23, struct \ > >> +...
2016 Apr 28
2
[RFC PATCH V2 2/2] vhost: device IOTLB API
...struct vhost_memory_region { > >> __u64 guest_phys_addr; > >> __u64 memory_size; /* bytes */ > >> @@ -127,6 +153,15 @@ struct vhost_memory { > >> /* Set eventfd to signal an error */ > >> #define VHOST_SET_VRING_ERR _IOW(VHOST_VIRTIO, 0x22, struct vhost_vring_file) > >> > >> +/* IOTLB */ > >> +/* Specify an eventfd file descriptor to signle on IOTLB miss */ > > typo > > Will fix it. > > > > >> +#define VHOST_SET_VRING_IOTLB_CALL _IOW(VHOST_VIRTIO, 0x23, struct \ > >> +...
2016 Apr 28
0
[RFC PATCH V2 2/2] vhost: device IOTLB API
...+}; >> + >> struct vhost_memory_region { >> __u64 guest_phys_addr; >> __u64 memory_size; /* bytes */ >> @@ -127,6 +153,15 @@ struct vhost_memory { >> /* Set eventfd to signal an error */ >> #define VHOST_SET_VRING_ERR _IOW(VHOST_VIRTIO, 0x22, struct vhost_vring_file) >> >> +/* IOTLB */ >> +/* Specify an eventfd file descriptor to signle on IOTLB miss */ > typo Will fix it. > >> +#define VHOST_SET_VRING_IOTLB_CALL _IOW(VHOST_VIRTIO, 0x23, struct \ >> + vhost_vring_file) >&gt...
2020 Jun 02
2
[PATCH] vdpa: bypass waking up vhost_woker for vdpa vq kick
...void __user *argp) a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 318 { a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 319 bool pollstart = false, pollstop = false; a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 320 struct file *eventfp, *filep = NULL; a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 321 struct vhost_vring_file f; a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 322 long r; a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 323 a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 324 if (copy_from_user(&f, argp, sizeof(f))) a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 325 return -EFAULT; a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 3...