search for: get_generation

Displaying 20 results from an estimated 111 matches for "get_generation".

2019 Oct 18
1
[PATCH V4 4/6] mdev: introduce virtio device and its device ops
...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 > + */ > +struct virtio_mdev_device_ops { > + /* Virtqueue ops */ > + int (*set_vq_address)(struct mdev_device *mdev, > + u16 idx, u64 desc_area, u64 driver_area, > +...
2019 Oct 24
1
[PATCH V5 4/6] mdev: introduce virtio device and its device ops
...that such a solution can become unmanageable as the set of class-ids would need to encompass every combination of features. So I think what's suggested by this is that the initial struct virtio_mdev_device_ops is a base set of callbacks which would be extended via features? But then why does get_generation() not make use of this? And if we can define get_generation() as optional and simply test if it's implemented, then it seems we don't need any feature bits to extend the structure (unless we're looking at binary compatibility). So maybe get_mdev_features() is meant to expose underlying...
2020 Jun 17
12
[PATCH 0/4] vDPA: API for reporting IOVA range
Hi All: This series introduces API for reporing IOVA range. This is a must for userspace to work correclty: - for the process that uses vhost-vDPA directly to properly allocate IOVA - for VM(qemu), when vIOMMU is not enabled, fail early if GPA is out of range - for VM(qemu), when vIOMMU is enabled, determine a valid guest address width Please review. Thanks Jason Wang (4): vdpa:
2020 Jun 17
12
[PATCH 0/4] vDPA: API for reporting IOVA range
Hi All: This series introduces API for reporing IOVA range. This is a must for userspace to work correclty: - for the process that uses vhost-vDPA directly to properly allocate IOVA - for VM(qemu), when vIOMMU is not enabled, fail early if GPA is out of range - for VM(qemu), when vIOMMU is enabled, determine a valid guest address width Please review. Thanks Jason Wang (4): vdpa:
2019 Sep 25
3
[PATCH V2 6/8] mdev: introduce virtio device and its device ops
...* configuration space > + * @buf: buffer used to write from > + * @len: the length to write to > + * configration space > + * @get_version: Get the version of virtio mdev device > + * @mdev: mediated device > + * Returns integer: version of the device > + * @get_generation: Get device generaton > + * @mdev: mediated device > + * Returns u32: device generation > + */ > +struct virtio_mdev_device_ops { > + /* Virtqueue ops */ > + int (*set_vq_address)(struct mdev_device *mdev, > + u16 idx, u64 desc_area, u64 driver_area, > +...
2019 Sep 25
3
[PATCH V2 6/8] mdev: introduce virtio device and its device ops
...* configuration space > + * @buf: buffer used to write from > + * @len: the length to write to > + * configration space > + * @get_version: Get the version of virtio mdev device > + * @mdev: mediated device > + * Returns integer: version of the device > + * @get_generation: Get device generaton > + * @mdev: mediated device > + * Returns u32: device generation > + */ > +struct virtio_mdev_device_ops { > + /* Virtqueue ops */ > + int (*set_vq_address)(struct mdev_device *mdev, > + u16 idx, u64 desc_area, u64 driver_area, > +...
2019 Oct 23
2
[PATCH V5 4/6] mdev: introduce virtio device and its device ops
...res: 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_generation: Get device config generaton (optionally) > + * @mdev: mediated device > + * Returns u32: device generation > + */ > +struct virtio_mdev_device_ops { > + /* Virtqueue ops */ > + int (*set_vq_address)(struct mdev_device *mdev, > + u16 idx, u64 desc_area, u64 drive...
2019 Oct 23
2
[PATCH V5 4/6] mdev: introduce virtio device and its device ops
...res: 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_generation: Get device config generaton (optionally) > + * @mdev: mediated device > + * Returns u32: device generation > + */ > +struct virtio_mdev_device_ops { > + /* Virtqueue ops */ > + int (*set_vq_address)(struct mdev_device *mdev, > + u16 idx, u64 desc_area, u64 drive...
2020 Jun 17
0
[PATCH 1/4] vdpa: introduce config op to get valid iova range
...start of the IOVA range + * @end: end of the IOVA range + */ +struct vdpa_iova_range { + u64 start; + u64 end; +}; + /** * vDPA_config_ops - operations for configuring a vDPA device. * Note: vDPA device drivers are required to implement all of the @@ -134,6 +144,9 @@ struct vdpa_device { * @get_generation: Get device config generation (optional) * @vdev: vdpa device * Returns u32: device generation + * @get_iova_range: Get supported iova range (on-chip IOMMU) + * @vdev: vdpa device + * Returns the iova range supported by the device * @set_map: Set device memory mapping (optiona...
2020 Aug 06
0
[PATCH 1/4] vdpa: introduce config op to get valid iova range
...behind. > > > > > > > > > /** > > > * vDPA_config_ops - operations for configuring a vDPA device. > > > * Note: vDPA device drivers are required to implement all of the > > > @@ -134,6 +144,9 @@ struct vdpa_device { > > > * @get_generation: Get device config generation (optional) > > > * @vdev: vdpa device > > > * Returns u32: device generation > > > + * @get_iova_range: Get supported iova range (on-chip IOMMU) > > > + * @vdev: vdpa device > > > + * Returns the iova range...
2020 Aug 21
0
[PATCH V2 3/3] vdpa_sim: implement get_iova_range()
...a_sim.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c index 62d640327145..89854e17c3c2 100644 --- a/drivers/vdpa/vdpa_sim/vdpa_sim.c +++ b/drivers/vdpa/vdpa_sim/vdpa_sim.c @@ -574,6 +574,16 @@ static u32 vdpasim_get_generation(struct vdpa_device *vdpa) return vdpasim->generation; } +struct vdpa_iova_range vdpasim_get_iova_range(struct vdpa_device *vdpa) +{ + struct vdpa_iova_range range = { + .first = 0ULL, + .last = ULLONG_MAX, + }; + + return range; +} + static int vdpasim_set_map(struct vdpa_device *vdpa,...
2019 Nov 05
1
[PATCH V7 4/6] mdev: introduce virtio device and its device ops
...mply their device ops structure includes callbacks for A but they're > > unused? > > > For current API, the answer is yes. So if vendor only support feature B, > it needs to set the device_ops that support feature A to NULL. Which is exactly what we expect to happen with get_generation() but we can't be bothered to add a feature flag for it? The interface is already self inconsistent. > > Why doesn't the previous patch take any of this into account > > for struct mdev_vfio_device_ops? I think this is an internal API, > > therefore is it worthwhile to...
2019 Oct 18
2
[PATCH V4 4/6] mdev: introduce virtio device and its device ops
...ures: 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_generation: Get device generaton > + * @mdev: mediated device > + * Returns u32: device generation Is that callback mandatory? > + */ > +struct virtio_mdev_device_ops { > + /* Virtqueue ops */ > + int (*set_vq_address)(struct mdev_device *mdev, > + u16 idx, u64 desc_area,...
2019 Oct 18
2
[PATCH V4 4/6] mdev: introduce virtio device and its device ops
...ures: 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_generation: Get device generaton > + * @mdev: mediated device > + * Returns u32: device generation Is that callback mandatory? > + */ > +struct virtio_mdev_device_ops { > + /* Virtqueue ops */ > + int (*set_vq_address)(struct mdev_device *mdev, > + u16 idx, u64 desc_area,...
2020 Aug 05
2
[PATCH 1/4] vdpa: introduce config op to get valid iova range
...> + This is ambiguous. Is end in the range or just behind it? How about first/last? > /** > * vDPA_config_ops - operations for configuring a vDPA device. > * Note: vDPA device drivers are required to implement all of the > @@ -134,6 +144,9 @@ struct vdpa_device { > * @get_generation: Get device config generation (optional) > * @vdev: vdpa device > * Returns u32: device generation > + * @get_iova_range: Get supported iova range (on-chip IOMMU) > + * @vdev: vdpa device > + * Returns the iova range supported by the device > * @set_map: Set...
2020 Aug 05
2
[PATCH 1/4] vdpa: introduce config op to get valid iova range
...> + This is ambiguous. Is end in the range or just behind it? How about first/last? > /** > * vDPA_config_ops - operations for configuring a vDPA device. > * Note: vDPA device drivers are required to implement all of the > @@ -134,6 +144,9 @@ struct vdpa_device { > * @get_generation: Get device config generation (optional) > * @vdev: vdpa device > * Returns u32: device generation > + * @get_iova_range: Get supported iova range (on-chip IOMMU) > + * @vdev: vdpa device > + * Returns the iova range supported by the device > * @set_map: Set...
2019 Sep 25
2
[PATCH V2 6/8] mdev: introduce virtio device and its device ops
...rite from > > > + * @len: the length to write to > > > + * configration space > > > + * @get_version: Get the version of virtio mdev device > > > + * @mdev: mediated device > > > + * Returns integer: version of the device > > > + * @get_generation: Get device generaton > > > + * @mdev: mediated device > > > + * Returns u32: device generation > > > + */ > > > +struct virtio_mdev_device_ops { > > > + /* Virtqueue ops */ > > > + int (*set_vq_address)(struct mdev_device *mdev, > &gt...
2019 Sep 25
2
[PATCH V2 6/8] mdev: introduce virtio device and its device ops
...rite from > > > + * @len: the length to write to > > > + * configration space > > > + * @get_version: Get the version of virtio mdev device > > > + * @mdev: mediated device > > > + * Returns integer: version of the device > > > + * @get_generation: Get device generaton > > > + * @mdev: mediated device > > > + * Returns u32: device generation > > > + */ > > > +struct virtio_mdev_device_ops { > > > + /* Virtqueue ops */ > > > + int (*set_vq_address)(struct mdev_device *mdev, > &gt...
2019 Sep 24
3
[PATCH V2 6/8] mdev: introduce virtio device and its device ops
...* configuration space > + * @buf: buffer used to write from > + * @len: the length to write to > + * configration space > + * @get_version: Get the version of virtio mdev device > + * @mdev: mediated device > + * Returns integer: version of the device > + * @get_generation: Get device generaton > + * @mdev: mediated device > + * Returns u32: device generation > + */ > +struct virtio_mdev_device_ops { > + /* Virtqueue ops */ > + int (*set_vq_address)(struct mdev_device *mdev, > + u16 idx, u64 desc_area, u64 driver_area, > +...
2019 Nov 04
2
[PATCH V7 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_generation: Get device config generaton (optional) > + * @mdev: mediated device > + * Returns u32: device generation > + */ > +struct mdev_virtio_device_ops { > + /* Mdev device ops */ > + u64 (*get_mdev_features)(struct mdev_device *mdev); > + bool (*set_mdev_feature)(struct mdev_...