Lines Matching refs:vdev
259 int (*set_vq_address)(struct vdpa_device *vdev,
262 void (*set_vq_num)(struct vdpa_device *vdev, u16 idx, u32 num);
263 void (*kick_vq)(struct vdpa_device *vdev, u16 idx);
264 void (*set_vq_cb)(struct vdpa_device *vdev, u16 idx,
266 void (*set_vq_ready)(struct vdpa_device *vdev, u16 idx, bool ready);
267 bool (*get_vq_ready)(struct vdpa_device *vdev, u16 idx);
268 int (*set_vq_state)(struct vdpa_device *vdev, u16 idx,
270 int (*get_vq_state)(struct vdpa_device *vdev, u16 idx,
273 (*get_vq_notification)(struct vdpa_device *vdev, u16 idx);
275 int (*get_vq_irq)(struct vdpa_device *vdev, u16 idx);
278 u32 (*get_vq_align)(struct vdpa_device *vdev);
279 u64 (*get_features)(struct vdpa_device *vdev);
280 int (*set_features)(struct vdpa_device *vdev, u64 features);
281 void (*set_config_cb)(struct vdpa_device *vdev,
283 u16 (*get_vq_num_max)(struct vdpa_device *vdev);
284 u16 (*get_vq_num_min)(struct vdpa_device *vdev);
285 u32 (*get_device_id)(struct vdpa_device *vdev);
286 u32 (*get_vendor_id)(struct vdpa_device *vdev);
287 u8 (*get_status)(struct vdpa_device *vdev);
288 void (*set_status)(struct vdpa_device *vdev, u8 status);
289 int (*reset)(struct vdpa_device *vdev);
290 size_t (*get_config_size)(struct vdpa_device *vdev);
291 void (*get_config)(struct vdpa_device *vdev, unsigned int offset,
293 void (*set_config)(struct vdpa_device *vdev, unsigned int offset,
295 u32 (*get_generation)(struct vdpa_device *vdev);
296 struct vdpa_iova_range (*get_iova_range)(struct vdpa_device *vdev);
299 int (*set_map)(struct vdpa_device *vdev, struct vhost_iotlb *iotlb);
300 int (*dma_map)(struct vdpa_device *vdev, u64 iova, u64 size,
302 int (*dma_unmap)(struct vdpa_device *vdev, u64 iova, u64 size);
305 void (*free)(struct vdpa_device *vdev);
333 int vdpa_register_device(struct vdpa_device *vdev, int nvqs);
334 void vdpa_unregister_device(struct vdpa_device *vdev);
336 int _vdpa_register_device(struct vdpa_device *vdev, int nvqs);
337 void _vdpa_unregister_device(struct vdpa_device *vdev);
347 int (*probe)(struct vdpa_device *vdev);
348 void (*remove)(struct vdpa_device *vdev);
370 static inline void *vdpa_get_drvdata(const struct vdpa_device *vdev) in vdpa_get_drvdata() argument
372 return dev_get_drvdata(&vdev->dev); in vdpa_get_drvdata()
375 static inline void vdpa_set_drvdata(struct vdpa_device *vdev, void *data) in vdpa_set_drvdata() argument
377 dev_set_drvdata(&vdev->dev, data); in vdpa_set_drvdata()
380 static inline struct device *vdpa_get_dma_dev(struct vdpa_device *vdev) in vdpa_get_dma_dev() argument
382 return vdev->dma_dev; in vdpa_get_dma_dev()
385 static inline int vdpa_reset(struct vdpa_device *vdev) in vdpa_reset() argument
387 const struct vdpa_config_ops *ops = vdev->config; in vdpa_reset()
389 vdev->features_valid = false; in vdpa_reset()
390 return ops->reset(vdev); in vdpa_reset()
393 static inline int vdpa_set_features(struct vdpa_device *vdev, u64 features) in vdpa_set_features() argument
395 const struct vdpa_config_ops *ops = vdev->config; in vdpa_set_features()
397 vdev->features_valid = true; in vdpa_set_features()
398 return ops->set_features(vdev, features); in vdpa_set_features()
401 void vdpa_get_config(struct vdpa_device *vdev, unsigned int offset,