Displaying 20 results from an estimated 22 matches for "vhost_mdev_config".
2019 Oct 29
2
[PATCH v3] vhost: introduce mdev based hardware backend
...sp, sizeof(status)))
+ return -EFAULT;
+
+ /*
+ * Userspace shouldn't remove status bits unless reset the
+ * status to 0.
+ */
+ if (status != 0 && (ops->get_status(mdev) & ~status) != 0)
+ return -EINVAL;
+
+ ops->set_status(mdev, status);
+
+ return 0;
+}
+
+static int vhost_mdev_config_validate(struct vhost_mdev *m,
+ struct vhost_mdev_config *c)
+{
+ long size = 0;
+
+ switch (m->virtio_id) {
+ case VIRTIO_ID_NET:
+ size = sizeof(struct virtio_net_config);
+ break;
+ }
+
+ if (c->len == 0)
+ return -EINVAL;
+
+ if (c->off >= size || c->len > size ||...
2019 Oct 29
2
[PATCH v3] vhost: introduce mdev based hardware backend
...sp, sizeof(status)))
+ return -EFAULT;
+
+ /*
+ * Userspace shouldn't remove status bits unless reset the
+ * status to 0.
+ */
+ if (status != 0 && (ops->get_status(mdev) & ~status) != 0)
+ return -EINVAL;
+
+ ops->set_status(mdev, status);
+
+ return 0;
+}
+
+static int vhost_mdev_config_validate(struct vhost_mdev *m,
+ struct vhost_mdev_config *c)
+{
+ long size = 0;
+
+ switch (m->virtio_id) {
+ case VIRTIO_ID_NET:
+ size = sizeof(struct virtio_net_config);
+ break;
+ }
+
+ if (c->len == 0)
+ return -EINVAL;
+
+ if (c->off >= size || c->len > size ||...
2019 Nov 05
4
[PATCH v5] vhost: introduce mdev based hardware backend
...sp, sizeof(status)))
+ return -EFAULT;
+
+ /*
+ * Userspace shouldn't remove status bits unless reset the
+ * status to 0.
+ */
+ if (status != 0 && (ops->get_status(mdev) & ~status) != 0)
+ return -EINVAL;
+
+ ops->set_status(mdev, status);
+
+ return 0;
+}
+
+static int vhost_mdev_config_validate(struct vhost_mdev *m,
+ struct vhost_mdev_config *c)
+{
+ long size = 0;
+
+ switch (m->virtio_id) {
+ case VIRTIO_ID_NET:
+ size = sizeof(struct virtio_net_config);
+ break;
+ }
+
+ if (c->len == 0)
+ return -EINVAL;
+
+ if (c->off >= size || c->len > size ||...
2019 Nov 05
4
[PATCH v5] vhost: introduce mdev based hardware backend
...sp, sizeof(status)))
+ return -EFAULT;
+
+ /*
+ * Userspace shouldn't remove status bits unless reset the
+ * status to 0.
+ */
+ if (status != 0 && (ops->get_status(mdev) & ~status) != 0)
+ return -EINVAL;
+
+ ops->set_status(mdev, status);
+
+ return 0;
+}
+
+static int vhost_mdev_config_validate(struct vhost_mdev *m,
+ struct vhost_mdev_config *c)
+{
+ long size = 0;
+
+ switch (m->virtio_id) {
+ case VIRTIO_ID_NET:
+ size = sizeof(struct virtio_net_config);
+ break;
+ }
+
+ if (c->len == 0)
+ return -EINVAL;
+
+ if (c->off >= size || c->len > size ||...
2019 Nov 07
2
[PATCH v6] vhost: introduce mdev based hardware backend
...sp, sizeof(status)))
+ return -EFAULT;
+
+ /*
+ * Userspace shouldn't remove status bits unless reset the
+ * status to 0.
+ */
+ if (status != 0 && (ops->get_status(mdev) & ~status) != 0)
+ return -EINVAL;
+
+ ops->set_status(mdev, status);
+
+ return 0;
+}
+
+static int vhost_mdev_config_validate(struct vhost_mdev *m,
+ struct vhost_mdev_config *c)
+{
+ long size = 0;
+
+ switch (m->virtio_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 -E2...
2019 Nov 06
2
[PATCH v5] vhost: introduce mdev based hardware backend
...e
> > + * status to 0.
> > + */
> > + if (status != 0 && (ops->get_status(mdev) & ~status) != 0)
> > + return -EINVAL;
> > +
> > + ops->set_status(mdev, status);
> > +
> > + return 0;
> > +}
> > +
> > +static int vhost_mdev_config_validate(struct vhost_mdev *m,
> > + struct vhost_mdev_config *c)
> > +{
> > + long size = 0;
> > +
> > + switch (m->virtio_id) {
> > + case VIRTIO_ID_NET:
> > + size = sizeof(struct virtio_net_config);
> > + break;
> > + }
> &g...
2019 Nov 06
2
[PATCH v5] vhost: introduce mdev based hardware backend
...e
> > + * status to 0.
> > + */
> > + if (status != 0 && (ops->get_status(mdev) & ~status) != 0)
> > + return -EINVAL;
> > +
> > + ops->set_status(mdev, status);
> > +
> > + return 0;
> > +}
> > +
> > +static int vhost_mdev_config_validate(struct vhost_mdev *m,
> > + struct vhost_mdev_config *c)
> > +{
> > + long size = 0;
> > +
> > + switch (m->virtio_id) {
> > + case VIRTIO_ID_NET:
> > + size = sizeof(struct virtio_net_config);
> > + break;
> > + }
> &g...
2019 Oct 30
1
[PATCH v3] vhost: introduce mdev based hardware backend
...e
> > + * status to 0.
> > + */
> > + if (status != 0 && (ops->get_status(mdev) & ~status) != 0)
> > + return -EINVAL;
> > +
> > + ops->set_status(mdev, status);
> > +
> > + return 0;
> > +}
> > +
> > +static int vhost_mdev_config_validate(struct vhost_mdev *m,
> > + struct vhost_mdev_config *c)
> > +{
> > + long size = 0;
> > +
> > + switch (m->virtio_id) {
> > + case VIRTIO_ID_NET:
> > + size = sizeof(struct virtio_net_config);
> > + break;
> > + }
> &g...
2019 Nov 06
0
[PATCH v5] vhost: introduce mdev based hardware backend
...rspace shouldn't remove status bits unless reset the
> + * status to 0.
> + */
> + if (status != 0 && (ops->get_status(mdev) & ~status) != 0)
> + return -EINVAL;
> +
> + ops->set_status(mdev, status);
> +
> + return 0;
> +}
> +
> +static int vhost_mdev_config_validate(struct vhost_mdev *m,
> + struct vhost_mdev_config *c)
> +{
> + long size = 0;
> +
> + switch (m->virtio_id) {
> + case VIRTIO_ID_NET:
> + size = sizeof(struct virtio_net_config);
> + break;
> + }
> +
> + if (c->len == 0)
> + return -EI...
2019 Nov 06
2
[PATCH v5] vhost: introduce mdev based hardware backend
...+ if (status != 0 && (ops->get_status(mdev) & ~status) != 0)
>>>> + return -EINVAL;
>>>> +
>>>> + ops->set_status(mdev, status);
>>>> +
>>>> + return 0;
>>>> +}
>>>> +
>>>> +static int vhost_mdev_config_validate(struct vhost_mdev *m,
>>>> + struct vhost_mdev_config *c)
>>>> +{
>>>> + long size = 0;
>>>> +
>>>> + switch (m->virtio_id) {
>>>> + case VIRTIO_ID_NET:
>>>> + size = sizeof(struct virtio_net_c...
2019 Nov 06
2
[PATCH v5] vhost: introduce mdev based hardware backend
...+ if (status != 0 && (ops->get_status(mdev) & ~status) != 0)
>>>> + return -EINVAL;
>>>> +
>>>> + ops->set_status(mdev, status);
>>>> +
>>>> + return 0;
>>>> +}
>>>> +
>>>> +static int vhost_mdev_config_validate(struct vhost_mdev *m,
>>>> + struct vhost_mdev_config *c)
>>>> +{
>>>> + long size = 0;
>>>> +
>>>> + switch (m->virtio_id) {
>>>> + case VIRTIO_ID_NET:
>>>> + size = sizeof(struct virtio_net_c...
2019 Oct 30
0
[PATCH v3] vhost: introduce mdev based hardware backend
...rspace shouldn't remove status bits unless reset the
> + * status to 0.
> + */
> + if (status != 0 && (ops->get_status(mdev) & ~status) != 0)
> + return -EINVAL;
> +
> + ops->set_status(mdev, status);
> +
> + return 0;
> +}
> +
> +static int vhost_mdev_config_validate(struct vhost_mdev *m,
> + struct vhost_mdev_config *c)
> +{
> + long size = 0;
> +
> + switch (m->virtio_id) {
> + case VIRTIO_ID_NET:
> + size = sizeof(struct virtio_net_config);
> + break;
> + }
> +
> + if (c->len == 0)
> + return -EI...
2019 Nov 06
0
[PATCH v5] vhost: introduce mdev based hardware backend
...rspace shouldn't remove status bits unless reset the
> + * status to 0.
> + */
> + if (status != 0 && (ops->get_status(mdev) & ~status) != 0)
> + return -EINVAL;
> +
> + ops->set_status(mdev, status);
> +
> + return 0;
> +}
> +
> +static int vhost_mdev_config_validate(struct vhost_mdev *m,
> + struct vhost_mdev_config *c)
> +{
> + long size = 0;
> +
> + switch (m->virtio_id) {
> + case VIRTIO_ID_NET:
> + size = sizeof(struct virtio_net_config);
> + break;
> + }
> +
> + if (c->len == 0)
> + return -EI...
2019 Nov 06
0
[PATCH v5] vhost: introduce mdev based hardware backend
...> > > + if (status != 0 && (ops->get_status(mdev) & ~status) != 0)
> > > + return -EINVAL;
> > > +
> > > + ops->set_status(mdev, status);
> > > +
> > > + return 0;
> > > +}
> > > +
> > > +static int vhost_mdev_config_validate(struct vhost_mdev *m,
> > > + struct vhost_mdev_config *c)
> > > +{
> > > + long size = 0;
> > > +
> > > + switch (m->virtio_id) {
> > > + case VIRTIO_ID_NET:
> > > + size = sizeof(struct virtio_net_config);
> &...
2019 Nov 06
0
[PATCH v5] vhost: introduce mdev based hardware backend
...atus) != 0)
> > > > > + return -EINVAL;
> > > > > +
> > > > > + ops->set_status(mdev, status);
> > > > > +
> > > > > + return 0;
> > > > > +}
> > > > > +
> > > > > +static int vhost_mdev_config_validate(struct vhost_mdev *m,
> > > > > + struct vhost_mdev_config *c)
> > > > > +{
> > > > > + long size = 0;
> > > > > +
> > > > > + switch (m->virtio_id) {
> > > > > + case VIRTIO_ID_NET:
>...
2019 Oct 31
2
[PATCH v4] vhost: introduce mdev based hardware backend
...sp, sizeof(status)))
+ return -EFAULT;
+
+ /*
+ * Userspace shouldn't remove status bits unless reset the
+ * status to 0.
+ */
+ if (status != 0 && (ops->get_status(mdev) & ~status) != 0)
+ return -EINVAL;
+
+ ops->set_status(mdev, status);
+
+ return 0;
+}
+
+static int vhost_mdev_config_validate(struct vhost_mdev *m,
+ struct vhost_mdev_config *c)
+{
+ long size = 0;
+
+ switch (m->virtio_id) {
+ case VIRTIO_ID_NET:
+ size = sizeof(struct virtio_net_config);
+ break;
+ }
+
+ if (c->len == 0)
+ return -EINVAL;
+
+ if (c->off >= size || c->len > size ||...
2019 Oct 31
2
[PATCH v4] vhost: introduce mdev based hardware backend
...sp, sizeof(status)))
+ return -EFAULT;
+
+ /*
+ * Userspace shouldn't remove status bits unless reset the
+ * status to 0.
+ */
+ if (status != 0 && (ops->get_status(mdev) & ~status) != 0)
+ return -EINVAL;
+
+ ops->set_status(mdev, status);
+
+ return 0;
+}
+
+static int vhost_mdev_config_validate(struct vhost_mdev *m,
+ struct vhost_mdev_config *c)
+{
+ long size = 0;
+
+ switch (m->virtio_id) {
+ case VIRTIO_ID_NET:
+ size = sizeof(struct virtio_net_config);
+ break;
+ }
+
+ if (c->len == 0)
+ return -EINVAL;
+
+ if (c->off >= size || c->len > size ||...
2019 Oct 29
2
[RFC] vhost_mdev: add network control vq support
...T_CTRL _IOW(VHOST_VIRTIO, 0x77, struct vhost_mdev_net_ctrl *)
+
#endif
diff --git a/include/uapi/linux/vhost_types.h b/include/uapi/linux/vhost_types.h
index 7b105d0b2fb9..e76b4d8e35e5 100644
--- a/include/uapi/linux/vhost_types.h
+++ b/include/uapi/linux/vhost_types.h
@@ -127,6 +127,12 @@ struct vhost_mdev_config {
__u8 buf[0];
};
+struct vhost_mdev_net_ctrl {
+ __u8 class;
+ __u8 cmd;
+ __u8 cmd_data[0];
+} __attribute__((packed));
+
/* Feature bits */
/* Log all write descriptors. Can be changed while device is active. */
#define VHOST_F_LOG_ALL 26
--
2.23.0
2019 Oct 29
2
[RFC] vhost_mdev: add network control vq support
...T_CTRL _IOW(VHOST_VIRTIO, 0x77, struct vhost_mdev_net_ctrl *)
+
#endif
diff --git a/include/uapi/linux/vhost_types.h b/include/uapi/linux/vhost_types.h
index 7b105d0b2fb9..e76b4d8e35e5 100644
--- a/include/uapi/linux/vhost_types.h
+++ b/include/uapi/linux/vhost_types.h
@@ -127,6 +127,12 @@ struct vhost_mdev_config {
__u8 buf[0];
};
+struct vhost_mdev_net_ctrl {
+ __u8 class;
+ __u8 cmd;
+ __u8 cmd_data[0];
+} __attribute__((packed));
+
/* Feature bits */
/* Log all write descriptors. Can be changed while device is active. */
#define VHOST_F_LOG_ALL 26
--
2.23.0
2019 Oct 29
0
[RFC] vhost_mdev: add network control vq support
...ruct vhost_mdev_net_ctrl *)
> +
> #endif
> diff --git a/include/uapi/linux/vhost_types.h b/include/uapi/linux/vhost_types.h
> index 7b105d0b2fb9..e76b4d8e35e5 100644
> --- a/include/uapi/linux/vhost_types.h
> +++ b/include/uapi/linux/vhost_types.h
> @@ -127,6 +127,12 @@ struct vhost_mdev_config {
> __u8 buf[0];
> };
>
> +struct vhost_mdev_net_ctrl {
> + __u8 class;
> + __u8 cmd;
> + __u8 cmd_data[0];
> +} __attribute__((packed));
> +
> /* Feature bits */
> /* Log all write descriptors. Can be changed while device is active. */
> #define VHOST_F_...