search for: statep

Displaying 10 results from an estimated 10 matches for "statep".

Did you mean: state
2019 Sep 26
6
[PATCH] vhost: introduce mdev based hardware backend
...->set_vq_ready(mdev, idx, 1); + } + + mdev_add_status(mdev, VIRTIO_CONFIG_S_DRIVER_OK); + if (mdev_get_status(mdev) & VIRTIO_CONFIG_S_NEEDS_RESET) + goto reset; + return 0; + +reset: + vhost_mdev_reset(m); + return -ENODEV; +} + +static long vhost_set_state(struct vhost_mdev *m, u64 __user *statep) +{ + u64 state; + long r; + + if (copy_from_user(&state, statep, sizeof(state))) + return -EFAULT; + + if (state >= VHOST_MDEV_S_MAX) + return -EINVAL; + + if (m->state == state) + return 0; + + m->state = state; + + switch (m->state) { + case VHOST_MDEV_S_RUNNING: + r = vhost_...
2019 Sep 26
6
[PATCH] vhost: introduce mdev based hardware backend
...->set_vq_ready(mdev, idx, 1); + } + + mdev_add_status(mdev, VIRTIO_CONFIG_S_DRIVER_OK); + if (mdev_get_status(mdev) & VIRTIO_CONFIG_S_NEEDS_RESET) + goto reset; + return 0; + +reset: + vhost_mdev_reset(m); + return -ENODEV; +} + +static long vhost_set_state(struct vhost_mdev *m, u64 __user *statep) +{ + u64 state; + long r; + + if (copy_from_user(&state, statep, sizeof(state))) + return -EFAULT; + + if (state >= VHOST_MDEV_S_MAX) + return -EINVAL; + + if (m->state == state) + return 0; + + m->state = state; + + switch (m->state) { + case VHOST_MDEV_S_RUNNING: + r = vhost_...
2019 Sep 26
0
[PATCH] vhost: introduce mdev based hardware backend
...status(mdev, VIRTIO_CONFIG_S_DRIVER_OK); > + if (mdev_get_status(mdev) & VIRTIO_CONFIG_S_NEEDS_RESET) > + goto reset; > + return 0; > + > +reset: > + vhost_mdev_reset(m); > + return -ENODEV; > +} > + > +static long vhost_set_state(struct vhost_mdev *m, u64 __user *statep) > +{ > + u64 state; > + long r; > + > + if (copy_from_user(&state, statep, sizeof(state))) > + return -EFAULT; > + > + if (state >= VHOST_MDEV_S_MAX) > + return -EINVAL; > + > + if (m->state == state) > + return 0; > + > + m->state = state;...
2019 Sep 27
0
[PATCH] vhost: introduce mdev based hardware backend
...status(mdev, VIRTIO_CONFIG_S_DRIVER_OK); > + if (mdev_get_status(mdev) & VIRTIO_CONFIG_S_NEEDS_RESET) > + goto reset; > + return 0; > + > +reset: > + vhost_mdev_reset(m); > + return -ENODEV; > +} > + > +static long vhost_set_state(struct vhost_mdev *m, u64 __user *statep) > +{ > + u64 state; > + long r; > + > + if (copy_from_user(&state, statep, sizeof(state))) > + return -EFAULT; > + > + if (state >= VHOST_MDEV_S_MAX) > + return -EINVAL; > + > + if (m->state == state) > + return 0; > + > + m->state = state;...
2019 Sep 17
0
[RFC v4 3/3] vhost: introduce mdev based hardware backend
...long vhost_mdev_stop_backend(struct vhost_mdev *m) +{ + struct mdev_device *mdev = m->mdev; + + mdev_reset(mdev); + mdev_add_status(mdev, VIRTIO_CONFIG_S_ACKNOWLEDGE); + mdev_add_status(mdev, VIRTIO_CONFIG_S_DRIVER); + return 0; +} + +static long vhost_set_state(struct vhost_mdev *m, u64 __user *statep) +{ + u64 state; + long r; + + if (copy_from_user(&state, statep, sizeof(state))) + return -EFAULT; + + if (state >= VHOST_MDEV_S_MAX) + return -EINVAL; + + if (m->state == state) + return 0; + + m->state = state; + + switch (m->state) { + case VHOST_MDEV_S_RUNNING: + r = vhost_...
2019 Sep 17
1
[RFC v4 3/3] vhost: introduce mdev based hardware backend
...> +{ > + struct mdev_device *mdev = m->mdev; > + > + mdev_reset(mdev); > + mdev_add_status(mdev, VIRTIO_CONFIG_S_ACKNOWLEDGE); > + mdev_add_status(mdev, VIRTIO_CONFIG_S_DRIVER); > + return 0; > +} > + > +static long vhost_set_state(struct vhost_mdev *m, u64 __user *statep) > +{ > + u64 state; > + long r; > + > + if (copy_from_user(&state, statep, sizeof(state))) > + return -EFAULT; > + > + if (state >= VHOST_MDEV_S_MAX) > + return -EINVAL; > + > + if (m->state == state) > + return 0; > + > + m->state = state;...
2019 Sep 17
7
[RFC v4 0/3] vhost: introduce mdev based hardware backend
This RFC is to demonstrate below ideas, a) Build vhost-mdev on top of the same abstraction defined in the virtio-mdev series [1]; b) Introduce /dev/vhost-mdev to do vhost ioctls and support setting mdev device as backend; Now the userspace API looks like this: - Userspace generates a compatible mdev device; - Userspace opens this mdev device with VFIO API (including doing IOMMU
2019 Sep 17
7
[RFC v4 0/3] vhost: introduce mdev based hardware backend
This RFC is to demonstrate below ideas, a) Build vhost-mdev on top of the same abstraction defined in the virtio-mdev series [1]; b) Introduce /dev/vhost-mdev to do vhost ioctls and support setting mdev device as backend; Now the userspace API looks like this: - Userspace generates a compatible mdev device; - Userspace opens this mdev device with VFIO API (including doing IOMMU
2019 Sep 02
2
[RFC v3] vhost: introduce mdev based hardware vhost backend
...ontainer_of(work, struct vhost_virtqueue, > + poll.work); > + struct vhost_mdev *vdpa = container_of(vq->dev, struct vhost_mdev, dev); > + > + vdpa->ops->notify(vdpa, vq - vdpa->vqs); > +} > + > +static int vhost_set_state(struct vhost_mdev *vdpa, u64 __user *statep) > +{ > + u64 state; > + > + if (copy_from_user(&state, statep, sizeof(state))) > + return -EFAULT; > + > + if (state >= VHOST_MDEV_S_MAX) > + return -EINVAL; > + > + if (vdpa->state == state) > + return 0; > + > + mutex_lock(&vdpa->dev.mut...
2019 Sep 02
2
[RFC v3] vhost: introduce mdev based hardware vhost backend
...ontainer_of(work, struct vhost_virtqueue, > + poll.work); > + struct vhost_mdev *vdpa = container_of(vq->dev, struct vhost_mdev, dev); > + > + vdpa->ops->notify(vdpa, vq - vdpa->vqs); > +} > + > +static int vhost_set_state(struct vhost_mdev *vdpa, u64 __user *statep) > +{ > + u64 state; > + > + if (copy_from_user(&state, statep, sizeof(state))) > + return -EFAULT; > + > + if (state >= VHOST_MDEV_S_MAX) > + return -EINVAL; > + > + if (vdpa->state == state) > + return 0; > + > + mutex_lock(&vdpa->dev.mut...