search for: featurep

Displaying 20 results from an estimated 174 matches for "featurep".

Did you mean: features
2020 Jul 20
1
[PATCH] vhost: vdpa: remove per device feature whitelist
...64 vhost_vdpa_features[] = { - [VIRTIO_ID_NET] = VHOST_VDPA_NET_FEATURES, -}; - static void handle_vq_kick(struct vhost_work *work) { struct vhost_virtqueue *vq = container_of(work, struct vhost_virtqueue, @@ -255,7 +222,6 @@ static long vhost_vdpa_get_features(struct vhost_vdpa *v, u64 __user *featurep) u64 features; features = ops->get_features(vdpa); - features &= vhost_vdpa_features[v->virtio_id]; if (copy_to_user(featurep, &features, sizeof(features))) return -EFAULT; @@ -279,9 +245,6 @@ static long vhost_vdpa_set_features(struct vhost_vdpa *v, u64 __user *featurep)...
2020 Sep 07
0
[PATCH] vhost-vdpa: fix backend feature ioctls
...st/vdpa.c index 3fab94f88894..796fe979f997 100644 --- a/drivers/vhost/vdpa.c +++ b/drivers/vhost/vdpa.c @@ -353,8 +353,6 @@ static long vhost_vdpa_vring_ioctl(struct vhost_vdpa *v, unsigned int cmd, struct vdpa_callback cb; struct vhost_virtqueue *vq; struct vhost_vring_state s; - u64 __user *featurep = argp; - u64 features; u32 idx; long r; @@ -381,18 +379,6 @@ static long vhost_vdpa_vring_ioctl(struct vhost_vdpa *v, unsigned int cmd, vq->last_avail_idx = vq_state.avail_index; break; - case VHOST_GET_BACKEND_FEATURES: - features = VHOST_VDPA_BACKEND_FEATURES; - if (copy_to_us...
2020 Sep 24
0
[RFC PATCH 01/24] vhost-vdpa: fix backend feature ioctls
...st/vdpa.c index 3fab94f88894..796fe979f997 100644 --- a/drivers/vhost/vdpa.c +++ b/drivers/vhost/vdpa.c @@ -353,8 +353,6 @@ static long vhost_vdpa_vring_ioctl(struct vhost_vdpa *v, unsigned int cmd, struct vdpa_callback cb; struct vhost_virtqueue *vq; struct vhost_vring_state s; - u64 __user *featurep = argp; - u64 features; u32 idx; long r; @@ -381,18 +379,6 @@ static long vhost_vdpa_vring_ioctl(struct vhost_vdpa *v, unsigned int cmd, vq->last_avail_idx = vq_state.avail_index; break; - case VHOST_GET_BACKEND_FEATURES: - features = VHOST_VDPA_BACKEND_FEATURES; - if (copy_to_us...
2020 Sep 09
0
[PATCH] vhost: new vhost_vdpa SET/GET_BACKEND_FEATURES handlers
...a.c > @@ -344,6 +344,33 @@ static long vhost_vdpa_set_config_call(struct vhost_vdpa > *v, u32 __user *argp) > return 0; > } > > + > +static long vhost_vdpa_get_backend_features(void __user *argp) > +{ > + u64 features = VHOST_VDPA_BACKEND_FEATURES; > + u64 __user *featurep = argp; > + long r; > + > + r = copy_to_user(featurep, &features, sizeof(features)); > + > + return r; > +} > +static long vhost_vdpa_set_backend_features(struct vhost_vdpa *v, void > __user *argp) > +{ > + u64 __user *featurep = argp; > + u64 features; > + &...
2020 Sep 24
1
[RFC PATCH 01/24] vhost-vdpa: fix backend feature ioctls
...979f997 100644 > --- a/drivers/vhost/vdpa.c > +++ b/drivers/vhost/vdpa.c > @@ -353,8 +353,6 @@ static long vhost_vdpa_vring_ioctl(struct vhost_vdpa *v, unsigned int cmd, > struct vdpa_callback cb; > struct vhost_virtqueue *vq; > struct vhost_vring_state s; > - u64 __user *featurep = argp; > - u64 features; > u32 idx; > long r; > > @@ -381,18 +379,6 @@ static long vhost_vdpa_vring_ioctl(struct vhost_vdpa *v, unsigned int cmd, > > vq->last_avail_idx = vq_state.avail_index; > break; > - case VHOST_GET_BACKEND_FEATURES: > - feature...
2023 Jun 05
2
[PATCH] vhost-vdpa: filter VIRTIO_F_RING_PACKED feature
...vhost/vdpa.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c index 8c1aefc865f0..ac2152135b23 100644 --- a/drivers/vhost/vdpa.c +++ b/drivers/vhost/vdpa.c @@ -397,6 +397,12 @@ static long vhost_vdpa_get_features(struct vhost_vdpa *v, u64 __user *featurep) features = ops->get_device_features(vdpa); + /* + * IOCTLs (eg. VHOST_GET_VRING_BASE, VHOST_SET_VRING_BASE) don't support + * packed virtqueue well yet, so let's filter the feature for now. + */ + features &= ~BIT_ULL(VIRTIO_F_RING_PACKED); + if (copy_to_user(featurep, &a...
2023 Jun 05
2
[PATCH] vhost-vdpa: filter VIRTIO_F_RING_PACKED feature
...vhost/vdpa.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c index 8c1aefc865f0..ac2152135b23 100644 --- a/drivers/vhost/vdpa.c +++ b/drivers/vhost/vdpa.c @@ -397,6 +397,12 @@ static long vhost_vdpa_get_features(struct vhost_vdpa *v, u64 __user *featurep) features = ops->get_device_features(vdpa); + /* + * IOCTLs (eg. VHOST_GET_VRING_BASE, VHOST_SET_VRING_BASE) don't support + * packed virtqueue well yet, so let's filter the feature for now. + */ + features &= ~BIT_ULL(VIRTIO_F_RING_PACKED); + if (copy_to_user(featurep, &a...
2020 Sep 09
0
[PATCH] vhost: new vhost_vdpa SET/GET_BACKEND_FEATURES handlers
...a8fc35b4ef0 Zhu Lingshan 2020-09-09 348 static long vhost_vdpa_get_backend_features(void __user *argp) f2da8fc35b4ef0 Zhu Lingshan 2020-09-09 349 { f2da8fc35b4ef0 Zhu Lingshan 2020-09-09 350 u64 features = VHOST_VDPA_BACKEND_FEATURES; f2da8fc35b4ef0 Zhu Lingshan 2020-09-09 351 u64 __user *featurep = argp; f2da8fc35b4ef0 Zhu Lingshan 2020-09-09 352 long r; f2da8fc35b4ef0 Zhu Lingshan 2020-09-09 353 f2da8fc35b4ef0 Zhu Lingshan 2020-09-09 354 r = copy_to_user(featurep, &features, sizeof(features)); f2da8fc35b4ef0 Zhu Lingshan 2020-09-09 355 f2da8fc35b4ef0 Zhu Lingshan 2020-09-09...
2023 Sep 09
0
[PATCH RFC v2 2/3] vhost-vdpa: introduce descriptor group backend feature
...ps->resume; } +static bool vhost_vdpa_has_desc_group(const struct vhost_vdpa *v) +{ + struct vdpa_device *vdpa = v->vdpa; + const struct vdpa_config_ops *ops = vdpa->config; + + return ops->get_vq_desc_group; +} + static long vhost_vdpa_get_features(struct vhost_vdpa *v, u64 __user *featurep) { struct vdpa_device *vdpa = v->vdpa; @@ -679,6 +687,7 @@ static long vhost_vdpa_unlocked_ioctl(struct file *filep, if (copy_from_user(&features, featurep, sizeof(features))) return -EFAULT; if (features & ~(VHOST_VDPA_BACKEND_FEATURES | + BIT_ULL(VHOST_BACKEND_F_DESC_A...
2020 May 25
0
[Sound-open-firmware] [PATCH RFC] vhost: add an SOF Audio DSP driver
...; +static long vhost_dsp_ioctl(struct file *filp, unsigned int ioctl, > > + unsigned long arg) > > +{ > > + struct vhost_dsp *dsp = filp->private_data; > > + void __user *argp = (void __user *)arg; > > + struct vhost_adsp_topology tplg; > > + u64 __user *featurep = argp; > > + u64 features; > > + int start; > > + long ret; > > + > > + switch (ioctl) { > > + case VHOST_GET_FEATURES: > > + features = VHOST_DSP_FEATURES; > > + if (copy_to_user(featurep, &features, sizeof(features))) > > + return -EF...
2013 May 08
1
[PATCH v2] vhost-test: Make vhost/test.c work
...].vq); mutex_unlock(&vq->mutex); @@ -268,14 +281,14 @@ static long vhost_test_ioctl(struct file *f, unsigned int ioctl, return -EFAULT; return vhost_test_run(n, test); case VHOST_GET_FEATURES: - features = VHOST_NET_FEATURES; + features = VHOST_FEATURES; if (copy_to_user(featurep, &features, sizeof features)) return -EFAULT; return 0; case VHOST_SET_FEATURES: if (copy_from_user(&features, featurep, sizeof features)) return -EFAULT; - if (features & ~VHOST_NET_FEATURES) + if (features & ~VHOST_FEATURES) return -EOPNOTSUPP; return vhos...
2013 May 08
1
[PATCH v2] vhost-test: Make vhost/test.c work
...].vq); mutex_unlock(&vq->mutex); @@ -268,14 +281,14 @@ static long vhost_test_ioctl(struct file *f, unsigned int ioctl, return -EFAULT; return vhost_test_run(n, test); case VHOST_GET_FEATURES: - features = VHOST_NET_FEATURES; + features = VHOST_FEATURES; if (copy_to_user(featurep, &features, sizeof features)) return -EFAULT; return 0; case VHOST_SET_FEATURES: if (copy_from_user(&features, featurep, sizeof features)) return -EFAULT; - if (features & ~VHOST_NET_FEATURES) + if (features & ~VHOST_FEATURES) return -EOPNOTSUPP; return vhos...
2013 May 07
1
[PATCH] vhost-test: Make vhost/test.c work
...].vq); mutex_unlock(&vq->mutex); @@ -268,14 +281,14 @@ static long vhost_test_ioctl(struct file *f, unsigned int ioctl, return -EFAULT; return vhost_test_run(n, test); case VHOST_GET_FEATURES: - features = VHOST_NET_FEATURES; + features = VHOST_FEATURES; if (copy_to_user(featurep, &features, sizeof features)) return -EFAULT; return 0; case VHOST_SET_FEATURES: if (copy_from_user(&features, featurep, sizeof features)) return -EFAULT; - if (features & ~VHOST_NET_FEATURES) + if (features & ~VHOST_FEATURES) return -EOPNOTSUPP; return vhos...
2013 May 07
1
[PATCH] vhost-test: Make vhost/test.c work
...].vq); mutex_unlock(&vq->mutex); @@ -268,14 +281,14 @@ static long vhost_test_ioctl(struct file *f, unsigned int ioctl, return -EFAULT; return vhost_test_run(n, test); case VHOST_GET_FEATURES: - features = VHOST_NET_FEATURES; + features = VHOST_FEATURES; if (copy_to_user(featurep, &features, sizeof features)) return -EFAULT; return 0; case VHOST_SET_FEATURES: if (copy_from_user(&features, featurep, sizeof features)) return -EFAULT; - if (features & ~VHOST_NET_FEATURES) + if (features & ~VHOST_FEATURES) return -EOPNOTSUPP; return vhos...
2019 Sep 26
6
[PATCH] vhost: introduce mdev based hardware backend
...ate = state; + + switch (m->state) { + case VHOST_MDEV_S_RUNNING: + r = vhost_mdev_start(m); + break; + case VHOST_MDEV_S_STOPPED: + r = vhost_mdev_reset(m); + break; + default: + r = -EINVAL; + break; + } + + return r; +} + +static long vhost_get_features(struct vhost_mdev *m, u64 __user *featurep) +{ + if (copy_to_user(featurep, &m->features, sizeof(m->features))) + return -EFAULT; + return 0; +} + +static long vhost_set_features(struct vhost_mdev *m, u64 __user *featurep) +{ + u64 features; + + if (copy_from_user(&features, featurep, sizeof(features))) + return -EFAULT; + +...
2019 Sep 26
6
[PATCH] vhost: introduce mdev based hardware backend
...ate = state; + + switch (m->state) { + case VHOST_MDEV_S_RUNNING: + r = vhost_mdev_start(m); + break; + case VHOST_MDEV_S_STOPPED: + r = vhost_mdev_reset(m); + break; + default: + r = -EINVAL; + break; + } + + return r; +} + +static long vhost_get_features(struct vhost_mdev *m, u64 __user *featurep) +{ + if (copy_to_user(featurep, &m->features, sizeof(m->features))) + return -EFAULT; + return 0; +} + +static long vhost_set_features(struct vhost_mdev *m, u64 __user *featurep) +{ + u64 features; + + if (copy_from_user(&features, featurep, sizeof(features))) + return -EFAULT; + +...
2019 Sep 26
0
[PATCH] vhost: introduce mdev based hardware backend
...gt; + r = vhost_mdev_start(m); > + break; > + case VHOST_MDEV_S_STOPPED: > + r = vhost_mdev_reset(m); > + break; > + default: > + r = -EINVAL; > + break; > + } > + > + return r; > +} > + > +static long vhost_get_features(struct vhost_mdev *m, u64 __user *featurep) > +{ > + if (copy_to_user(featurep, &m->features, sizeof(m->features))) > + return -EFAULT; > + return 0; > +} > + > +static long vhost_set_features(struct vhost_mdev *m, u64 __user *featurep) > +{ > + u64 features; > + > + if (copy_from_user(&featur...
2019 Oct 22
2
[PATCH v2] vhost: introduce mdev based hardware backend
...bits unless reset the + * status to 0. + */ + if (status != 0 && (m->status & ~status) != 0) + return -EINVAL; + + ops->set_status(mdev, status); + m->status = ops->get_status(mdev); + + return 0; +} + +static long vhost_mdev_get_features(struct vhost_mdev *m, u64 __user *featurep) +{ + if (copy_to_user(featurep, &m->features, sizeof(m->features))) + return -EFAULT; + return 0; +} + +static long vhost_mdev_set_features(struct vhost_mdev *m, u64 __user *featurep) +{ + const struct virtio_mdev_device_ops *ops = mdev_get_dev_ops(m->mdev); + struct mdev_device *mde...
2019 Oct 22
2
[PATCH v2] vhost: introduce mdev based hardware backend
...bits unless reset the + * status to 0. + */ + if (status != 0 && (m->status & ~status) != 0) + return -EINVAL; + + ops->set_status(mdev, status); + m->status = ops->get_status(mdev); + + return 0; +} + +static long vhost_mdev_get_features(struct vhost_mdev *m, u64 __user *featurep) +{ + if (copy_to_user(featurep, &m->features, sizeof(m->features))) + return -EFAULT; + return 0; +} + +static long vhost_mdev_set_features(struct vhost_mdev *m, u64 __user *featurep) +{ + const struct virtio_mdev_device_ops *ops = mdev_get_dev_ops(m->mdev); + struct mdev_device *mde...
2019 Sep 27
0
[PATCH] vhost: introduce mdev based hardware backend
...gt; + r = vhost_mdev_start(m); > + break; > + case VHOST_MDEV_S_STOPPED: > + r = vhost_mdev_reset(m); > + break; > + default: > + r = -EINVAL; > + break; > + } > + > + return r; > +} > + > +static long vhost_get_features(struct vhost_mdev *m, u64 __user *featurep) > +{ > + if (copy_to_user(featurep, &m->features, sizeof(m->features))) > + return -EFAULT; > + return 0; > +} > + > +static long vhost_set_features(struct vhost_mdev *m, u64 __user *featurep) > +{ > + u64 features; > + > + if (copy_from_user(&featur...