search for: vhost_vdpa_get_config

Displaying 5 results from an estimated 5 matches for "vhost_vdpa_get_config".

2020 Aug 05
0
[PATCH v3 20/38] vhost/vdpa: switch to new helpers
..._vdpa_reset(struct vhost_vdpa *v) { struct vdpa_device *vdpa = v->vdpa; - const struct vdpa_config_ops *ops = vdpa->config; - ops->set_status(vdpa, 0); + vdpa_reset(vdpa); } static long vhost_vdpa_get_device_id(struct vhost_vdpa *v, u8 __user *argp) @@ -196,7 +195,6 @@ static long vhost_vdpa_get_config(struct vhost_vdpa *v, struct vhost_vdpa_config __user *c) { struct vdpa_device *vdpa = v->vdpa; - const struct vdpa_config_ops *ops = vdpa->config; struct vhost_vdpa_config config; unsigned long size = offsetof(struct vhost_vdpa_config, buf); u8 *buf; @@ -209,7 +207,7 @@ stati...
2020 Feb 05
0
[PATCH] vhost: introduce vDPA based backend
...t virtio_net_config); > > + break; > > + } > > + > > + if (c->len == 0) > > + return -EINVAL; > > + > > + if (c->len > size - c->off) > > + return -E2BIG; > > + > > + return 0; > > +} > > + > > +static long vhost_vdpa_get_config(struct vhost_vdpa *v, > > + struct vhost_vdpa_config __user *c) > > +{ > > + struct vdpa_device *vdpa = v->vdpa; > > + const struct vdpa_config_ops *ops = vdpa->config; > > + struct vhost_vdpa_config config; > > + unsigned long size = offsetof(struct v...
2020 Feb 04
10
[PATCH] vhost: introduce vDPA based backend
...rtio_id) { > + case VIRTIO_ID_NET: > + size = sizeof(struct virtio_net_config); > + break; > + } > + > + if (c->len == 0) > + return -EINVAL; > + > + if (c->len > size - c->off) > + return -E2BIG; > + > + return 0; > +} > + > +static long vhost_vdpa_get_config(struct vhost_vdpa *v, > + struct vhost_vdpa_config __user *c) > +{ > + struct vdpa_device *vdpa = v->vdpa; > + const struct vdpa_config_ops *ops = vdpa->config; > + struct vhost_vdpa_config config; > + unsigned long size = offsetof(struct vhost_vdpa_config, buf); > +...
2020 Feb 04
10
[PATCH] vhost: introduce vDPA based backend
...rtio_id) { > + case VIRTIO_ID_NET: > + size = sizeof(struct virtio_net_config); > + break; > + } > + > + if (c->len == 0) > + return -EINVAL; > + > + if (c->len > size - c->off) > + return -E2BIG; > + > + return 0; > +} > + > +static long vhost_vdpa_get_config(struct vhost_vdpa *v, > + struct vhost_vdpa_config __user *c) > +{ > + struct vdpa_device *vdpa = v->vdpa; > + const struct vdpa_config_ops *ops = vdpa->config; > + struct vhost_vdpa_config config; > + unsigned long size = offsetof(struct vhost_vdpa_config, buf); > +...
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).