Displaying 6 results from an estimated 6 matches for "vhost_vdpa_set_featur".
Did you mean:
vhost_vdpa_set_features
2020 Jul 20
1
[PATCH] vhost: vdpa: remove per device feature whitelist
...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)
if (copy_from_user(&features, featurep, sizeof(features)))
return -EFAULT;
- if (features & ~vhost_vdpa_features[v->virtio_id])
- return -EINVAL;
-
if (ops->set_features(vdpa, features))
return -EINVAL;
--
2.20.1
2020 Aug 05
0
[PATCH v3 20/38] vhost/vdpa: switch to new helpers
...static long vhost_vdpa_get_config(struct vhost_vdpa *v,
if (!buf)
return -ENOMEM;
- ops->get_config(vdpa, config.off, buf, config.len);
+ vdpa_get_config(vdpa, config.off, buf, config.len);
if (copy_to_user(c->buf, buf, config.len)) {
kvfree(buf);
@@ -282,7 +280,7 @@ static long vhost_vdpa_set_features(struct vhost_vdpa *v, u64 __user *featurep)
if (features & ~vhost_vdpa_features[v->virtio_id])
return -EINVAL;
- if (ops->set_features(vdpa, features))
+ if (vdpa_set_features(vdpa, features))
return -EINVAL;
return 0;
--
MST
2020 Feb 05
0
[PATCH] vhost: introduce vDPA based backend
...eatures = ops->get_features(vdpa);
> > + features &= vhost_vdpa_features[v->virtio_id];
> > +
> > + if (copy_to_user(featurep, &features, sizeof(features)))
> > + return -EFAULT;
> > +
> > + return 0;
> > +}
> > +
> > +static long vhost_vdpa_set_features(struct vhost_vdpa *v, u64 __user *featurep)
> > +{
> > + struct vdpa_device *vdpa = v->vdpa;
> > + const struct vdpa_config_ops *ops = vdpa->config;
> > + u64 features;
> > +
> > + /*
> > + * It's not allowed to change the features after they h...
2020 Feb 04
10
[PATCH] vhost: introduce vDPA based backend
...;config;
> + u64 features;
> +
> + features = ops->get_features(vdpa);
> + features &= vhost_vdpa_features[v->virtio_id];
> +
> + if (copy_to_user(featurep, &features, sizeof(features)))
> + return -EFAULT;
> +
> + return 0;
> +}
> +
> +static long vhost_vdpa_set_features(struct vhost_vdpa *v, u64 __user *featurep)
> +{
> + struct vdpa_device *vdpa = v->vdpa;
> + const struct vdpa_config_ops *ops = vdpa->config;
> + u64 features;
> +
> + /*
> + * It's not allowed to change the features after they have
> + * been negotiated.
>...
2020 Feb 04
10
[PATCH] vhost: introduce vDPA based backend
...;config;
> + u64 features;
> +
> + features = ops->get_features(vdpa);
> + features &= vhost_vdpa_features[v->virtio_id];
> +
> + if (copy_to_user(featurep, &features, sizeof(features)))
> + return -EFAULT;
> +
> + return 0;
> +}
> +
> +static long vhost_vdpa_set_features(struct vhost_vdpa *v, u64 __user *featurep)
> +{
> + struct vdpa_device *vdpa = v->vdpa;
> + const struct vdpa_config_ops *ops = vdpa->config;
> + u64 features;
> +
> + /*
> + * It's not allowed to change the features after they have
> + * been negotiated.
>...
2020 Aug 03
51
[PATCH v2 00/24] virtio: config space endian-ness cleanup
Config space endian-ness is currently a mess: fields are
not tagged with the correct endian-ness so it's easy
to make mistakes like instanciating config space in
native endian-ness.
The following patches adding sparse tagging are currently in my tree.
Lightly tested.
As a follow-up, I plan to add new APIs that handle modern config space
in a more efficient way (bypassing the version check).