Displaying 10 results from an estimated 10 matches for "vdpa_set_features".
2020 Aug 05
2
[PATCH v2 19/24] vdpa: make sure set_features in invoked for legacy
...vdev->dma_dev;
> }
> +
> +static inline void vdpa_reset(struct vdpa_device *vdev)
> +{
> + const struct vdpa_config_ops *ops = vdev->config;
> +
> + vdev->features_valid = false;
> + ops->set_status(vdev, 0);
> +}
> +
> +static inline int vdpa_set_features(struct vdpa_device *vdev, u64 features)
> +{
> + const struct vdpa_config_ops *ops = vdev->config;
> +
> + vdev->features_valid = true;
> + return ops->set_features(vdev, features);
> +}
> +
> +
> +static inline void vdpa_get_config(struct vdpa_devi...
2020 Aug 05
2
[PATCH v2 19/24] vdpa: make sure set_features in invoked for legacy
...vdev->dma_dev;
> }
> +
> +static inline void vdpa_reset(struct vdpa_device *vdev)
> +{
> + const struct vdpa_config_ops *ops = vdev->config;
> +
> + vdev->features_valid = false;
> + ops->set_status(vdev, 0);
> +}
> +
> +static inline int vdpa_set_features(struct vdpa_device *vdev, u64 features)
> +{
> + const struct vdpa_config_ops *ops = vdev->config;
> +
> + vdev->features_valid = true;
> + return ops->set_features(vdev, features);
> +}
> +
> +
> +static inline void vdpa_get_config(struct vdpa_devi...
2020 Jul 28
0
[vhost:vhost 40/45] drivers/virtio/virtio_vdpa.c:301:9: error: void value not ignored as it ought to be
...^
include/linux/vdpa.h: In function 'vdpa_reset':
include/linux/vdpa.h:276:6: error: 'struct vdpa_device' has no member named 'features_valid'
276 | vdev->features_valid = false;
| ^~
include/linux/vdpa.h: In function 'vdpa_set_features':
include/linux/vdpa.h:284:6: error: 'struct vdpa_device' has no member named 'features_valid'
284 | vdev->features_valid = true;
| ^~
include/linux/vdpa.h: In function 'vdpa_get_config':
include/linux/vdpa.h:298:11: error: 'struct vdp...
2020 Aug 03
0
[PATCH v2 19/24] vdpa: make sure set_features in invoked for legacy
...*vdpa_get_dma_dev(struct vdpa_device *vdev)
{
return vdev->dma_dev;
}
+
+static inline void vdpa_reset(struct vdpa_device *vdev)
+{
+ const struct vdpa_config_ops *ops = vdev->config;
+
+ vdev->features_valid = false;
+ ops->set_status(vdev, 0);
+}
+
+static inline int vdpa_set_features(struct vdpa_device *vdev, u64 features)
+{
+ const struct vdpa_config_ops *ops = vdev->config;
+
+ vdev->features_valid = true;
+ return ops->set_features(vdev, features);
+}
+
+
+static inline void vdpa_get_config(struct vdpa_device *vdev, unsigned offset,
+ void *buf,...
2020 Aug 05
0
[PATCH v3 19/38] vdpa: make sure set_features is invoked for legacy
...*vdpa_get_dma_dev(struct vdpa_device *vdev)
{
return vdev->dma_dev;
}
+
+static inline void vdpa_reset(struct vdpa_device *vdev)
+{
+ const struct vdpa_config_ops *ops = vdev->config;
+
+ vdev->features_valid = false;
+ ops->set_status(vdev, 0);
+}
+
+static inline int vdpa_set_features(struct vdpa_device *vdev, u64 features)
+{
+ const struct vdpa_config_ops *ops = vdev->config;
+
+ vdev->features_valid = true;
+ return ops->set_features(vdev, features);
+}
+
+
+static inline void vdpa_get_config(struct vdpa_device *vdev, unsigned offset,
+ void *buf,...
2020 Aug 05
0
[PATCH v2 19/24] vdpa: make sure set_features in invoked for legacy
...static inline void vdpa_reset(struct vdpa_device *vdev)
> > +{
> > + const struct vdpa_config_ops *ops = vdev->config;
> > +
> > + vdev->features_valid = false;
> > + ops->set_status(vdev, 0);
> > +}
> > +
> > +static inline int vdpa_set_features(struct vdpa_device *vdev, u64 features)
> > +{
> > + const struct vdpa_config_ops *ops = vdev->config;
> > +
> > + vdev->features_valid = true;
> > + return ops->set_features(vdev, features);
> > +}
> > +
> > +
> > +static...
2020 Jul 28
0
[vhost:vhost 38/45] include/linux/vdpa.h:43:21: error: expected ':', ',', ';', '}' or '__attribute__' before '.' token
...^
include/linux/vdpa.h: In function 'vdpa_reset':
>> include/linux/vdpa.h:276:6: error: 'struct vdpa_device' has no member named 'features_valid'
276 | vdev->features_valid = false;
| ^~
include/linux/vdpa.h: In function 'vdpa_set_features':
include/linux/vdpa.h:284:6: error: 'struct vdpa_device' has no member named 'features_valid'
284 | vdev->features_valid = true;
| ^~
include/linux/vdpa.h: In function 'vdpa_get_config':
include/linux/vdpa.h:298:11: error: 'struct vdp...
2020 Aug 05
0
[PATCH v3 20/38] vhost/vdpa: switch to new helpers
...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 Aug 05
0
[PATCH v3 21/38] virtio_vdpa: legacy features handling
...features(struct virtio_device *vdev)
{
struct vdpa_device *vdpa = vd_get_vdpa(vdev);
- const struct vdpa_config_ops *ops = vdpa->config;
/* Give virtio_ring a chance to accept features. */
vring_transport_features(vdev);
- return ops->set_features(vdpa, vdev->features);
+ return vdpa_set_features(vdpa, vdev->features);
}
static const char *virtio_vdpa_bus_name(struct virtio_device *vdev)
--
MST
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).