search for: get_mdev_features

Displaying 20 results from an estimated 61 matches for "get_mdev_features".

2019 Oct 18
1
[PATCH V4 4/6] mdev: introduce virtio device and its device ops
...es: Get virtio features supported by the device > + * @mdev: mediated device > + * Returns the virtio features support by the > + * device > + * @get_features: Set virtio features supported by the driver s/get_features/set_features/ > + * configration space > + * @get_mdev_features: Get the feature of virtio mdev device > + * @mdev: mediated device > + * Returns the mdev features (API) support by > + * the device. > + * @get_generation: Get device generaton > + * @mdev: mediated device > + * Returns u32: device generation > + */ > +str...
2019 Oct 24
1
[PATCH V5 4/6] mdev: introduce virtio device and its device ops
...> to know that it support new device ops. MDEV_CLASS_ID_VIRTIOv2 may only > be useful when we will invent a complete new API. But this interface rather conflates features and versions by returning a version as a feature. If we simply want to say that there are no additional features, then get_mdev_features() should return an empty set. If dirty page logging is a feature, then I'd expect a bit in the get_mdev_features() return value to identify that feature. However, I've been under the impression (perhaps wrongly) that the class-id has a 1:1 correlation to the device-ops exposed to the bus...
2019 Oct 21
1
[PATCH V4 5/6] virtio: introduce a mdev based transport
...v_release_dev; > >> + vm_dev->vdev.config = &virtio_mdev_config_ops; > >> + vm_dev->mdev = mdev; > >> + INIT_LIST_HEAD(&vm_dev->virtqueues); > >> + spin_lock_init(&vm_dev->lock); > >> + > >> + vm_dev->version = ops->get_mdev_features(mdev); > >> + if (vm_dev->version != VIRTIO_MDEV_F_VERSION_1) { > >> + dev_err(dev, "VIRTIO_MDEV_F_VERSION_1 is mandatory\n"); > >> + return -ENXIO; > >> + } > > Hm, so how is that mdev features interface supposed to work? If > > VIRT...
2019 Oct 18
2
[PATCH V4 5/6] virtio: introduce a mdev based transport
...= dev; > + vm_dev->vdev.dev.release = virtio_mdev_release_dev; > + vm_dev->vdev.config = &virtio_mdev_config_ops; > + vm_dev->mdev = mdev; > + INIT_LIST_HEAD(&vm_dev->virtqueues); > + spin_lock_init(&vm_dev->lock); > + > + vm_dev->version = ops->get_mdev_features(mdev); > + if (vm_dev->version != VIRTIO_MDEV_F_VERSION_1) { > + dev_err(dev, "VIRTIO_MDEV_F_VERSION_1 is mandatory\n"); > + return -ENXIO; > + } Hm, so how is that mdev features interface supposed to work? If VIRTIO_MDEV_F_VERSION_1 is a bit, I would expect this code to...
2019 Oct 18
2
[PATCH V4 5/6] virtio: introduce a mdev based transport
...= dev; > + vm_dev->vdev.dev.release = virtio_mdev_release_dev; > + vm_dev->vdev.config = &virtio_mdev_config_ops; > + vm_dev->mdev = mdev; > + INIT_LIST_HEAD(&vm_dev->virtqueues); > + spin_lock_init(&vm_dev->lock); > + > + vm_dev->version = ops->get_mdev_features(mdev); > + if (vm_dev->version != VIRTIO_MDEV_F_VERSION_1) { > + dev_err(dev, "VIRTIO_MDEV_F_VERSION_1 is mandatory\n"); > + return -ENXIO; > + } Hm, so how is that mdev features interface supposed to work? If VIRTIO_MDEV_F_VERSION_1 is a bit, I would expect this code to...
2019 Oct 23
2
[PATCH V5 4/6] mdev: introduce virtio device and its device ops
...t_config: Write to device specific configuration space > + * @mdev: mediated device > + * @offset: offset from the beginning of > + * configuration space > + * @buf: buffer used to write from > + * @len: the length to write to > + * configration space > + * @get_mdev_features: Get a set of bits that demonstrate > + * thecapability of the mdev device. New > + * features bits must be added when > + * introducing new device ops. > + * @mdev: mediated device > + * Returns the mdev features (API) support by > + * the device. > + * @get...
2019 Oct 23
2
[PATCH V5 4/6] mdev: introduce virtio device and its device ops
...t_config: Write to device specific configuration space > + * @mdev: mediated device > + * @offset: offset from the beginning of > + * configuration space > + * @buf: buffer used to write from > + * @len: the length to write to > + * configration space > + * @get_mdev_features: Get a set of bits that demonstrate > + * thecapability of the mdev device. New > + * features bits must be added when > + * introducing new device ops. > + * @mdev: mediated device > + * Returns the mdev features (API) support by > + * the device. > + * @get...
2019 Nov 04
2
[PATCH V7 4/6] mdev: introduce virtio device and its device ops
...truct mdev_virtio_device_ops - Structure to be registered for each > + * mdev device to register the device for virtio/vhost drivers. > + * > + * The device ops that is supported by VIRTIO_MDEV_F_VERSION_1, the > + * callbacks are mandatory unless explicity mentioned. > + * > + * @get_mdev_features: Get a set of bits that demonstrate > + * the capability of the mdev device. New > + * feature bits must be added when > + * introducing new device ops. This > + * allows the device ops to be extended > + * (one feature could have N new ops). > + * @mdev: mediat...
2019 Nov 04
2
[PATCH V7 4/6] mdev: introduce virtio device and its device ops
...truct mdev_virtio_device_ops - Structure to be registered for each > + * mdev device to register the device for virtio/vhost drivers. > + * > + * The device ops that is supported by VIRTIO_MDEV_F_VERSION_1, the > + * callbacks are mandatory unless explicity mentioned. > + * > + * @get_mdev_features: Get a set of bits that demonstrate > + * the capability of the mdev device. New > + * feature bits must be added when > + * introducing new device ops. This > + * allows the device ops to be extended > + * (one feature could have N new ops). > + * @mdev: mediat...
2019 Oct 18
2
[PATCH V4 4/6] mdev: introduce virtio device and its device ops
...t_config: Write to device specific configuration space > + * @mdev: mediated device > + * @offset: offset from the beginning of > + * configuration space > + * @buf: buffer used to write from > + * @len: the length to write to > + * configration space > + * @get_mdev_features: Get the feature of virtio mdev device > + * @mdev: mediated device > + * Returns the mdev features (API) support by > + * the device. What kind of 'features' are supposed to go in there? Are these bits, like you defined for VIRTIO_MDEV_F_VERSION_1 above? > + * @get_...
2019 Oct 18
2
[PATCH V4 4/6] mdev: introduce virtio device and its device ops
...t_config: Write to device specific configuration space > + * @mdev: mediated device > + * @offset: offset from the beginning of > + * configuration space > + * @buf: buffer used to write from > + * @len: the length to write to > + * configration space > + * @get_mdev_features: Get the feature of virtio mdev device > + * @mdev: mediated device > + * Returns the mdev features (API) support by > + * the device. What kind of 'features' are supposed to go in there? Are these bits, like you defined for VIRTIO_MDEV_F_VERSION_1 above? > + * @get_...
2019 Nov 04
0
[PATCH V7 4/6] mdev: introduce virtio device and its device ops
...oid *private; +}; + +/** + * struct mdev_virtio_device_ops - Structure to be registered for each + * mdev device to register the device for virtio/vhost drivers. + * + * The device ops that is supported by VIRTIO_MDEV_F_VERSION_1, the + * callbacks are mandatory unless explicity mentioned. + * + * @get_mdev_features: Get a set of bits that demonstrate + * the capability of the mdev device. New + * feature bits must be added when + * introducing new device ops. This + * allows the device ops to be extended + * (one feature could have N new ops). + * @mdev: mediated device + * Returns the m...
2019 Nov 05
1
[PATCH V7 4/6] mdev: introduce virtio device and its device ops
...red for each > >> + * mdev device to register the device for virtio/vhost drivers. > >> + * > >> + * The device ops that is supported by VIRTIO_MDEV_F_VERSION_1, the > >> + * callbacks are mandatory unless explicity mentioned. > >> + * > >> + * @get_mdev_features: Get a set of bits that demonstrate > >> + * the capability of the mdev device. New > >> + * feature bits must be added when > >> + * introducing new device ops. This > >> + * allows the device ops to be extended > >> + * (one feature cou...
2019 Nov 05
0
[PATCH V7 4/6] mdev: introduce virtio device and its device ops
..._ops - Structure to be registered for each >> + * mdev device to register the device for virtio/vhost drivers. >> + * >> + * The device ops that is supported by VIRTIO_MDEV_F_VERSION_1, the >> + * callbacks are mandatory unless explicity mentioned. >> + * >> + * @get_mdev_features: Get a set of bits that demonstrate >> + * the capability of the mdev device. New >> + * feature bits must be added when >> + * introducing new device ops. This >> + * allows the device ops to be extended >> + * (one feature could have N new ops). >&...
2019 Oct 18
1
[PATCH V4 4/6] mdev: introduce virtio device and its device ops
...gt;> + * @mdev: mediated device > >> + * @offset: offset from the beginning of > >> + * configuration space > >> + * @buf: buffer used to write from > >> + * @len: the length to write to > >> + * configration space > >> + * @get_mdev_features: Get the feature of virtio mdev device > >> + * @mdev: mediated device > >> + * Returns the mdev features (API) support by > >> + * the device. > > What kind of 'features' are supposed to go in there? Are these bits, > > like you defined fo...
2019 Oct 29
2
[RFC] vhost_mdev: add network control vq support
...io_mdev_callback { void *private; }; +struct vhost_mdev_net_ctrl; + /** * struct vfio_mdev_device_ops - Structure to be registered for each * mdev device to register the device for virtio/vhost drivers. @@ -151,6 +153,14 @@ struct virtio_mdev_device_ops { /* Mdev device ops */ u64 (*get_mdev_features)(struct mdev_device *mdev); + + /* Vhost-mdev (MDEV_CLASS_ID_VHOST) specific ops */ + union { + struct { + int (*ctrl)(struct mdev_device *mdev, + struct vhost_mdev_net_ctrl __user *ctrl); + } net; + }; }; void mdev_set_virtio_ops(struct mdev_device *mdev, diff --git a/include/uapi/l...
2019 Oct 29
2
[RFC] vhost_mdev: add network control vq support
...io_mdev_callback { void *private; }; +struct vhost_mdev_net_ctrl; + /** * struct vfio_mdev_device_ops - Structure to be registered for each * mdev device to register the device for virtio/vhost drivers. @@ -151,6 +153,14 @@ struct virtio_mdev_device_ops { /* Mdev device ops */ u64 (*get_mdev_features)(struct mdev_device *mdev); + + /* Vhost-mdev (MDEV_CLASS_ID_VHOST) specific ops */ + union { + struct { + int (*ctrl)(struct mdev_device *mdev, + struct vhost_mdev_net_ctrl __user *ctrl); + } net; + }; }; void mdev_set_virtio_ops(struct mdev_device *mdev, diff --git a/include/uapi/l...
2019 Oct 11
0
[PATCH V3 5/7] mdev: introduce virtio device and its device ops
...m + * configration space + * @set_config: Write to device specific configuration space + * @mdev: mediated device + * @offset: offset from the beginning of + * configuration space + * @buf: buffer used to write from + * @len: the length to write to + * configration space + * @get_mdev_features: Get the feature of virtio mdev device + * @mdev: mediated device + * Returns the mdev features (API) support by + * the device. + * @get_generation: Get device generaton + * @mdev: mediated device + * Returns u32: device generation + */ +struct virtio_mdev_device_ops { + /* Virtqu...
2019 Oct 17
0
[PATCH V4 4/6] mdev: introduce virtio device and its device ops
...m + * configration space + * @set_config: Write to device specific configuration space + * @mdev: mediated device + * @offset: offset from the beginning of + * configuration space + * @buf: buffer used to write from + * @len: the length to write to + * configration space + * @get_mdev_features: Get the feature of virtio mdev device + * @mdev: mediated device + * Returns the mdev features (API) support by + * the device. + * @get_generation: Get device generaton + * @mdev: mediated device + * Returns u32: device generation + */ +struct virtio_mdev_device_ops { + /* Virtqu...
2019 Oct 18
0
[PATCH V4 4/6] mdev: introduce virtio device and its device ops
...specific configuration space >> + * @mdev: mediated device >> + * @offset: offset from the beginning of >> + * configuration space >> + * @buf: buffer used to write from >> + * @len: the length to write to >> + * configration space >> + * @get_mdev_features: Get the feature of virtio mdev device >> + * @mdev: mediated device >> + * Returns the mdev features (API) support by >> + * the device. > What kind of 'features' are supposed to go in there? Are these bits, > like you defined for VIRTIO_MDEV_F_VERSION_1 a...