search for: mdev_add_status

Displaying 12 results from an estimated 12 matches for "mdev_add_status".

2019 Sep 17
0
[RFC v4 3/3] vhost: introduce mdev based hardware backend
...dev_device *mdev, loff_t off, u32 val); + +static u8 mdev_get_status(struct mdev_device *mdev) +{ + return virtio_mdev_readl(mdev, VIRTIO_MDEV_STATUS); +} + +static void mdev_set_status(struct mdev_device *mdev, u8 status) +{ + virtio_mdev_writel(mdev, VIRTIO_MDEV_STATUS, status); +} + +static void mdev_add_status(struct mdev_device *mdev, u8 status) +{ + status |= mdev_get_status(mdev); + mdev_set_status(mdev, status); +} + +static void mdev_reset(struct mdev_device *mdev) +{ + mdev_set_status(mdev, 0); +} + +static void handle_vq_kick(struct vhost_work *work) +{ + struct vhost_virtqueue *vq = container_of(...
2019 Sep 26
6
[PATCH] vhost: introduce mdev based hardware backend
...ct virtio_mdev_device_ops *ops = mdev_get_dev_ops(mdev); + + return ops->get_status(mdev); +} + +static void mdev_set_status(struct mdev_device *mdev, u8 status) +{ + const struct virtio_mdev_device_ops *ops = mdev_get_dev_ops(mdev); + + return ops->set_status(mdev, status); +} + +static void mdev_add_status(struct mdev_device *mdev, u8 status) +{ + status |= mdev_get_status(mdev); + mdev_set_status(mdev, status); +} + +static void mdev_reset(struct mdev_device *mdev) +{ + mdev_set_status(mdev, 0); +} + +static void handle_vq_kick(struct vhost_work *work) +{ + struct vhost_virtqueue *vq = container_of(...
2019 Sep 26
6
[PATCH] vhost: introduce mdev based hardware backend
...ct virtio_mdev_device_ops *ops = mdev_get_dev_ops(mdev); + + return ops->get_status(mdev); +} + +static void mdev_set_status(struct mdev_device *mdev, u8 status) +{ + const struct virtio_mdev_device_ops *ops = mdev_get_dev_ops(mdev); + + return ops->set_status(mdev, status); +} + +static void mdev_add_status(struct mdev_device *mdev, u8 status) +{ + status |= mdev_get_status(mdev); + mdev_set_status(mdev, status); +} + +static void mdev_reset(struct mdev_device *mdev) +{ + mdev_set_status(mdev, 0); +} + +static void handle_vq_kick(struct vhost_work *work) +{ + struct vhost_virtqueue *vq = container_of(...
2019 Sep 17
1
[RFC v4 3/3] vhost: introduce mdev based hardware backend
...u8 mdev_get_status(struct mdev_device *mdev) > +{ > + return virtio_mdev_readl(mdev, VIRTIO_MDEV_STATUS); > +} > + > +static void mdev_set_status(struct mdev_device *mdev, u8 status) > +{ > + virtio_mdev_writel(mdev, VIRTIO_MDEV_STATUS, status); > +} > + > +static void mdev_add_status(struct mdev_device *mdev, u8 status) > +{ > + status |= mdev_get_status(mdev); > + mdev_set_status(mdev, status); > +} > + > +static void mdev_reset(struct mdev_device *mdev) > +{ > + mdev_set_status(mdev, 0); > +} > + > +static void handle_vq_kick(struct vhost_work...
2019 Sep 26
0
[PATCH] vhost: introduce mdev based hardware backend
...; + > + return ops->get_status(mdev); > +} > + > +static void mdev_set_status(struct mdev_device *mdev, u8 status) > +{ > + const struct virtio_mdev_device_ops *ops = mdev_get_dev_ops(mdev); > + > + return ops->set_status(mdev, status); > +} > + > +static void mdev_add_status(struct mdev_device *mdev, u8 status) > +{ > + status |= mdev_get_status(mdev); > + mdev_set_status(mdev, status); > +} > + > +static void mdev_reset(struct mdev_device *mdev) > +{ > + mdev_set_status(mdev, 0); > +} > + > +static void handle_vq_kick(struct vhost_work...
2019 Sep 27
0
[PATCH] vhost: introduce mdev based hardware backend
...; + > + return ops->get_status(mdev); > +} > + > +static void mdev_set_status(struct mdev_device *mdev, u8 status) > +{ > + const struct virtio_mdev_device_ops *ops = mdev_get_dev_ops(mdev); > + > + return ops->set_status(mdev, status); > +} > + > +static void mdev_add_status(struct mdev_device *mdev, u8 status) > +{ > + status |= mdev_get_status(mdev); > + mdev_set_status(mdev, status); > +} > + > +static void mdev_reset(struct mdev_device *mdev) > +{ > + mdev_set_status(mdev, 0); > +} > + > +static void handle_vq_kick(struct vhost_work...
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 27
5
[PATCH] vhost: introduce mdev based hardware backend
...dev = m->mdev; > > + const struct virtio_mdev_device_ops *ops = mdev_get_dev_ops(mdev); > > + struct virtio_mdev_callback cb; > > + struct vhost_virtqueue *vq; > > + int idx; > > + > > + ops->set_features(mdev, m->acked_features); > > + > > + mdev_add_status(mdev, VIRTIO_CONFIG_S_FEATURES_OK); > > + if (!(mdev_get_status(mdev) & VIRTIO_CONFIG_S_FEATURES_OK)) > > + goto reset; > > + > > + for (idx = 0; idx < m->nvqs; idx++) { > > + vq = &m->vqs[idx]; > > + > > + if (!vq->desc || !vq->av...
2019 Sep 27
5
[PATCH] vhost: introduce mdev based hardware backend
...dev = m->mdev; > > + const struct virtio_mdev_device_ops *ops = mdev_get_dev_ops(mdev); > > + struct virtio_mdev_callback cb; > > + struct vhost_virtqueue *vq; > > + int idx; > > + > > + ops->set_features(mdev, m->acked_features); > > + > > + mdev_add_status(mdev, VIRTIO_CONFIG_S_FEATURES_OK); > > + if (!(mdev_get_status(mdev) & VIRTIO_CONFIG_S_FEATURES_OK)) > > + goto reset; > > + > > + for (idx = 0; idx < m->nvqs; idx++) { > > + vq = &m->vqs[idx]; > > + > > + if (!vq->desc || !vq->av...
2019 Sep 27
1
[PATCH] vhost: introduce mdev based hardware backend
...= mdev_get_dev_ops(mdev); > > > > + struct virtio_mdev_callback cb; > > > > + struct vhost_virtqueue *vq; > > > > + int idx; > > > > + > > > > + ops->set_features(mdev, m->acked_features); > > > > + > > > > + mdev_add_status(mdev, VIRTIO_CONFIG_S_FEATURES_OK); > > > > + if (!(mdev_get_status(mdev) & VIRTIO_CONFIG_S_FEATURES_OK)) > > > > + goto reset; > > > > + > > > > + for (idx = 0; idx < m->nvqs; idx++) { > > > > + vq = &m->vqs[idx]; >...
2019 Sep 27
0
[PATCH] vhost: introduce mdev based hardware backend
...t;> + const struct virtio_mdev_device_ops *ops = mdev_get_dev_ops(mdev); >>> + struct virtio_mdev_callback cb; >>> + struct vhost_virtqueue *vq; >>> + int idx; >>> + >>> + ops->set_features(mdev, m->acked_features); >>> + >>> + mdev_add_status(mdev, VIRTIO_CONFIG_S_FEATURES_OK); >>> + if (!(mdev_get_status(mdev) & VIRTIO_CONFIG_S_FEATURES_OK)) >>> + goto reset; >>> + >>> + for (idx = 0; idx < m->nvqs; idx++) { >>> + vq = &m->vqs[idx]; >>> + >>> + if (!vq-&...