Displaying 20 results from an estimated 313 matches for "vhost_vring_ioctl".
2018 May 22
2
[RFC V4 PATCH 7/8] vhost: packed ring support
...-
> drivers/vhost/vhost.h | 8 +-
> 3 files changed, 513 insertions(+), 37 deletions(-)
>
> diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
> index 8304c30..f2a0f5b 100644
> --- a/drivers/vhost/vhost.c
> +++ b/drivers/vhost/vhost.c
> @@ -1358,6 +1382,8 @@ long vhost_vring_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *arg
> break;
> }
> vq->last_avail_idx = s.num;
> + if (vhost_has_feature(vq, VIRTIO_F_RING_PACKED))
> + vq->avail_wrap_counter = s.num >> 31;
> /* Forget the cached index value. */
> vq->ava...
2018 May 22
2
[RFC V4 PATCH 7/8] vhost: packed ring support
...-
> drivers/vhost/vhost.h | 8 +-
> 3 files changed, 513 insertions(+), 37 deletions(-)
>
> diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
> index 8304c30..f2a0f5b 100644
> --- a/drivers/vhost/vhost.c
> +++ b/drivers/vhost/vhost.c
> @@ -1358,6 +1382,8 @@ long vhost_vring_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *arg
> break;
> }
> vq->last_avail_idx = s.num;
> + if (vhost_has_feature(vq, VIRTIO_F_RING_PACKED))
> + vq->avail_wrap_counter = s.num >> 31;
> /* Forget the cached index value. */
> vq->ava...
2019 Nov 07
1
[PATCH v5] vhost: introduce mdev based hardware backend
...he
>>>> VHOST_SET_OWNER ioctl to get the vq->handle_kick to work.
>>>> So if we don't call vhost_dev_ioctl(), we will need to
>>>> call vhost_dev_set_owner() directly.
>> I may miss something, it looks to me the there's no owner check in
>> vhost_vring_ioctl() and the vhost_poll_start() can make sure handle_kick
>> works?
> Yeah, there is no owner check in vhost_vring_ioctl().
> IIUC, vhost_poll_start() will start polling the file. And when
> event arrives, vhost_poll_wakeup() will be called, and it will
> queue work to work_list and...
2018 May 23
1
[RFC V4 PATCH 7/8] vhost: packed ring support
...iles changed, 513 insertions(+), 37 deletions(-)
> >>
> >>diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
> >>index 8304c30..f2a0f5b 100644
> >>--- a/drivers/vhost/vhost.c
> >>+++ b/drivers/vhost/vhost.c
> >>@@ -1358,6 +1382,8 @@ long vhost_vring_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *arg
> >> break;
> >> }
> >> vq->last_avail_idx = s.num;
> >>+ if (vhost_has_feature(vq, VIRTIO_F_RING_PACKED))
> >>+ vq->avail_wrap_counter = s.num >> 31;
> >> /*...
2020 Feb 14
0
vhost changes (batched) in linux-next after 12/13 trigger random crashes in KVM guests after reboot
...? My intention is to check
>>> if
>>> "strange VHOST_SET_VRING_BASE" line appears. In previous tests, it appears very fast, but maybe it takes some time
>>> for
>>> it to appear, or it does not appear anymore.
yep it does:
[ 67.801012] [1917] vhost:vhost_vring_ioctl:1655: VHOST_SET_VRING_BASE [vq=0000000088199421][vq->last_avail_idx=0][vq->avail_idx=0][s.index=0][s.num=0]
[ 67.801018] [1917] vhost:vhost_vring_ioctl:1655: VHOST_SET_VRING_BASE [vq=00000000175f11ec][vq->last_avail_idx=0][vq->avail_idx=0][s.index=1][s.num=0]
[ 67.801026] [1917] vho...
2020 Feb 14
0
vhost changes (batched) in linux-next after 12/13 trigger random crashes in KVM guests after reboot
...: 1908 Comm: CPU 0/KVM Not tainted 5.5.0+ #21
[ 55.951891] Hardware name: IBM 3906 M04 704 (LPAR)
[ 55.951892] Call Trace:
[ 55.951902] [<0000001ede114132>] show_stack+0x8a/0xd0
[ 55.951906] [<0000001edeb0672a>] dump_stack+0x8a/0xb8
[ 55.951915] [<000003ff803736a6>] vhost_vring_ioctl+0x6fe/0x858 [vhost]
[ 55.951919] [<000003ff8042a608>] vhost_net_ioctl+0x510/0x570 [vhost_net]
[ 55.951924] [<0000001ede3c4dd8>] do_vfs_ioctl+0x430/0x6f8
[ 55.951926] [<0000001ede3c5124>] ksys_ioctl+0x84/0xb0
[ 55.951927] [<0000001ede3c51ba>] __s390x_sys_ioctl...
2020 Feb 14
0
vhost changes (batched) in linux-next after 12/13 trigger random crashes in KVM guests after reboot
...21
>> [ 55.951891] Hardware name: IBM 3906 M04 704 (LPAR)
>> [ 55.951892] Call Trace:
>> [ 55.951902] [<0000001ede114132>] show_stack+0x8a/0xd0
>> [ 55.951906] [<0000001edeb0672a>] dump_stack+0x8a/0xb8
>> [ 55.951915] [<000003ff803736a6>] vhost_vring_ioctl+0x6fe/0x858 [vhost]
>> [ 55.951919] [<000003ff8042a608>] vhost_net_ioctl+0x510/0x570 [vhost_net]
>> [ 55.951924] [<0000001ede3c4dd8>] do_vfs_ioctl+0x430/0x6f8
>> [ 55.951926] [<0000001ede3c5124>] ksys_ioctl+0x84/0xb0
>> [ 55.951927] [<0000001...
2015 Sep 16
2
vhost: build failure
Hi,
While crosscompiling the kernel for openrisc with allmodconfig the build
failed with the error:
drivers/vhost/vhost.c: In function 'vhost_vring_ioctl':
drivers/vhost/vhost.c:818:3: error: call to '__compiletime_assert_818' declared with attribute error: BUILD_BUG_ON failed: __alignof__
*vq->avail > VRING_AVAIL_ALIGN_SIZE
Can you please give me any idea about what the problem might be and how
it can be solved.
You can see the...
2015 Sep 16
2
vhost: build failure
Hi,
While crosscompiling the kernel for openrisc with allmodconfig the build
failed with the error:
drivers/vhost/vhost.c: In function 'vhost_vring_ioctl':
drivers/vhost/vhost.c:818:3: error: call to '__compiletime_assert_818' declared with attribute error: BUILD_BUG_ON failed: __alignof__
*vq->avail > VRING_AVAIL_ALIGN_SIZE
Can you please give me any idea about what the problem might be and how
it can be solved.
You can see the...
2019 Jan 04
1
[RFC PATCH V3 5/5] vhost: access vq metadata through kernel virtual address
....addr))
> + vhost_setup_used_vmap(vq, (unsigned long)vq->used);
> +
> return 1;
> + }
>
> return iotlb_access_ok(vq, VHOST_ACCESS_RO, (u64)(uintptr_t)vq->desc,
> vhost_get_desc_size(vq, num), VHOST_ADDR_DESC) &&
> @@ -1478,6 +1725,13 @@ long vhost_vring_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *arg
>
> mutex_lock(&vq->mutex);
>
> + /* Unregister MMU notifer to allow invalidation callback
> + * can access vq->avail, vq->desc , vq->used and vq->num
> + * without holding vq->mutex.
> + *...
2018 Oct 12
2
[PATCH net-next V2 6/8] vhost: packed ring support
On Mon, Jul 16, 2018 at 11:28:09AM +0800, Jason Wang wrote:
[...]
> @@ -1367,10 +1397,48 @@ long vhost_vring_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *arg
> vq->last_avail_idx = s.num;
> /* Forget the cached index value. */
> vq->avail_idx = vq->last_avail_idx;
> + if (vhost_has_feature(vq, VIRTIO_F_RING_PACKED)) {
> + vq->last_avail_wrap_counter = wrap_c...
2018 Oct 12
2
[PATCH net-next V2 6/8] vhost: packed ring support
On Mon, Jul 16, 2018 at 11:28:09AM +0800, Jason Wang wrote:
[...]
> @@ -1367,10 +1397,48 @@ long vhost_vring_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *arg
> vq->last_avail_idx = s.num;
> /* Forget the cached index value. */
> vq->avail_idx = vq->last_avail_idx;
> + if (vhost_has_feature(vq, VIRTIO_F_RING_PACKED)) {
> + vq->last_avail_wrap_counter = wrap_c...
2023 Jul 04
0
[linux-next:master] BUILD REGRESSION 1c6f93977947dbba1fc4d250c4eb8a7d4cfdecf1
...38: warning: cast from 'void (*)(const void *)' to 'kunit_action_t *' (aka 'void (*)(void *)') converts to incompatible function type [-Wcast-function-type-strict]
Unverified Error/Warning (likely false positive, please contact us if interested):
drivers/vhost/vhost.c:1654 vhost_vring_ioctl() error: uninitialized symbol 'vq'.
drivers/vhost/vhost.c:1685 vhost_vring_ioctl() error: uninitialized symbol 'idx'.
drivers/vhost/vhost.c:763 vhost_worker_ioctl() error: uninitialized symbol 'vq'.
drivers/vhost/vhost.c:774 vhost_worker_ioctl() error: uninitialized symbol &...
2013 Jul 07
2
[PATCH v2 03/11] vhost: Make vhost a separate module
...vq_log_access_ok(vq->dev, vq, vq->log_base);
> > > }
> > > +EXPORT_SYMBOL_GPL(vhost_vq_access_ok);
> > >
> > > static long vhost_set_memory(struct vhost_dev *d, struct vhost_memory __user *m)
> > > {
> > > @@ -791,6 +809,7 @@ long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp)
> > > vhost_poll_flush(&vq->poll);
> > > return r;
> > > }
> > > +EXPORT_SYMBOL_GPL(vhost_vring_ioctl);
> > >
> > > /* Caller must have device mutex */
> > > long vhost...
2013 Jul 07
2
[PATCH v2 03/11] vhost: Make vhost a separate module
...vq_log_access_ok(vq->dev, vq, vq->log_base);
> > > }
> > > +EXPORT_SYMBOL_GPL(vhost_vq_access_ok);
> > >
> > > static long vhost_set_memory(struct vhost_dev *d, struct vhost_memory __user *m)
> > > {
> > > @@ -791,6 +809,7 @@ long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp)
> > > vhost_poll_flush(&vq->poll);
> > > return r;
> > > }
> > > +EXPORT_SYMBOL_GPL(vhost_vring_ioctl);
> > >
> > > /* Caller must have device mutex */
> > > long vhost...
2015 Apr 07
1
[PATCH v3 7/7] vhost: feature to set the vring endianness
...p)
> +{
> + return 0;
> +}
> +
> +static long vhost_get_vring_endian_legacy(struct vhost_virtqueue *vq,
> + u32 idx,
> + void __user *argp)
> +{
> + return 0;
> +}
Should be -ENOIOCTLCMD?
> +#endif /* CONFIG_VHOST_SET_ENDIAN_LEGACY */
> +
> long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp)
> {
> struct file *eventfp, *filep = NULL;
> @@ -806,6 +855,12 @@ long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp)
> } else
> filep = eventfp;
> break;
> + case VHOST_SET_VRING_ENDIAN_LEGAC...
2015 Apr 07
1
[PATCH v3 7/7] vhost: feature to set the vring endianness
...p)
> +{
> + return 0;
> +}
> +
> +static long vhost_get_vring_endian_legacy(struct vhost_virtqueue *vq,
> + u32 idx,
> + void __user *argp)
> +{
> + return 0;
> +}
Should be -ENOIOCTLCMD?
> +#endif /* CONFIG_VHOST_SET_ENDIAN_LEGACY */
> +
> long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp)
> {
> struct file *eventfp, *filep = NULL;
> @@ -806,6 +855,12 @@ long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp)
> } else
> filep = eventfp;
> break;
> + case VHOST_SET_VRING_ENDIAN_LEGAC...
2015 Apr 07
1
[PATCH v3 7/7] vhost: feature to set the vring endianness
...; + void __user *argp)
> +{
> + return 0;
> +}
> +
> +static long vhost_get_vring_endian_legacy(struct vhost_virtqueue *vq,
> + u32 idx,
> + void __user *argp)
> +{
> + return 0;
> +}
> +#endif /* CONFIG_VHOST_SET_ENDIAN_LEGACY */
> +
> long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp)
> {
> struct file *eventfp, *filep = NULL;
> @@ -806,6 +855,12 @@ long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp)
> } else
> filep = eventfp;
> break;
> + case VHOST_SET_VRING_ENDIAN_LEGAC...
2015 Apr 07
1
[PATCH v3 7/7] vhost: feature to set the vring endianness
...; + void __user *argp)
> +{
> + return 0;
> +}
> +
> +static long vhost_get_vring_endian_legacy(struct vhost_virtqueue *vq,
> + u32 idx,
> + void __user *argp)
> +{
> + return 0;
> +}
> +#endif /* CONFIG_VHOST_SET_ENDIAN_LEGACY */
> +
> long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp)
> {
> struct file *eventfp, *filep = NULL;
> @@ -806,6 +855,12 @@ long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp)
> } else
> filep = eventfp;
> break;
> + case VHOST_SET_VRING_ENDIAN_LEGAC...
2015 Nov 16
1
[PATCH] vhost: relax log address alignment
...y: Michael S. Tsirkin <mst at redhat.com>
---
drivers/vhost/vhost.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index eec2f11..080422f 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -819,7 +819,7 @@ long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp)
BUILD_BUG_ON(__alignof__ *vq->used > VRING_USED_ALIGN_SIZE);
if ((a.avail_user_addr & (VRING_AVAIL_ALIGN_SIZE - 1)) ||
(a.used_user_addr & (VRING_USED_ALIGN_SIZE - 1)) ||
- (a.log_guest_addr & (sizeof(u64) - 1)))...