Lines Matching refs:vdpa_device
88 struct vdpa_device { struct
373 int (*set_vq_address)(struct vdpa_device *vdev,
376 void (*set_vq_num)(struct vdpa_device *vdev, u16 idx, u32 num);
377 void (*kick_vq)(struct vdpa_device *vdev, u16 idx);
378 void (*kick_vq_with_data)(struct vdpa_device *vdev, u32 data);
379 void (*set_vq_cb)(struct vdpa_device *vdev, u16 idx,
381 void (*set_vq_ready)(struct vdpa_device *vdev, u16 idx, bool ready);
382 bool (*get_vq_ready)(struct vdpa_device *vdev, u16 idx);
383 int (*set_vq_state)(struct vdpa_device *vdev, u16 idx,
385 int (*get_vq_state)(struct vdpa_device *vdev, u16 idx,
387 int (*get_vendor_vq_stats)(struct vdpa_device *vdev, u16 idx,
391 (*get_vq_notification)(struct vdpa_device *vdev, u16 idx);
393 int (*get_vq_irq)(struct vdpa_device *vdev, u16 idx);
394 u16 (*get_vq_size)(struct vdpa_device *vdev, u16 idx);
397 u32 (*get_vq_align)(struct vdpa_device *vdev);
398 u32 (*get_vq_group)(struct vdpa_device *vdev, u16 idx);
399 u32 (*get_vq_desc_group)(struct vdpa_device *vdev, u16 idx);
400 u64 (*get_device_features)(struct vdpa_device *vdev);
401 u64 (*get_backend_features)(const struct vdpa_device *vdev);
402 int (*set_driver_features)(struct vdpa_device *vdev, u64 features);
403 u64 (*get_driver_features)(struct vdpa_device *vdev);
404 void (*set_config_cb)(struct vdpa_device *vdev,
406 u16 (*get_vq_num_max)(struct vdpa_device *vdev);
407 u16 (*get_vq_num_min)(struct vdpa_device *vdev);
408 u32 (*get_device_id)(struct vdpa_device *vdev);
409 u32 (*get_vendor_id)(struct vdpa_device *vdev);
410 u8 (*get_status)(struct vdpa_device *vdev);
411 void (*set_status)(struct vdpa_device *vdev, u8 status);
412 int (*reset)(struct vdpa_device *vdev);
413 int (*compat_reset)(struct vdpa_device *vdev, u32 flags);
415 int (*suspend)(struct vdpa_device *vdev);
416 int (*resume)(struct vdpa_device *vdev);
417 size_t (*get_config_size)(struct vdpa_device *vdev);
418 void (*get_config)(struct vdpa_device *vdev, unsigned int offset,
420 void (*set_config)(struct vdpa_device *vdev, unsigned int offset,
422 u32 (*get_generation)(struct vdpa_device *vdev);
423 struct vdpa_iova_range (*get_iova_range)(struct vdpa_device *vdev);
424 int (*set_vq_affinity)(struct vdpa_device *vdev, u16 idx,
426 const struct cpumask *(*get_vq_affinity)(struct vdpa_device *vdev,
430 int (*set_map)(struct vdpa_device *vdev, unsigned int asid,
432 int (*dma_map)(struct vdpa_device *vdev, unsigned int asid,
434 int (*dma_unmap)(struct vdpa_device *vdev, unsigned int asid,
436 int (*reset_map)(struct vdpa_device *vdev, unsigned int asid);
437 int (*set_group_asid)(struct vdpa_device *vdev, unsigned int group,
439 struct device *(*get_vq_dma_dev)(struct vdpa_device *vdev, u16 idx);
440 int (*bind_mm)(struct vdpa_device *vdev, struct mm_struct *mm);
441 void (*unbind_mm)(struct vdpa_device *vdev);
444 void (*free)(struct vdpa_device *vdev);
447 struct vdpa_device *__vdpa_alloc_device(struct device *parent,
476 int vdpa_register_device(struct vdpa_device *vdev, u32 nvqs);
477 void vdpa_unregister_device(struct vdpa_device *vdev);
479 int _vdpa_register_device(struct vdpa_device *vdev, u32 nvqs);
480 void _vdpa_unregister_device(struct vdpa_device *vdev);
490 int (*probe)(struct vdpa_device *vdev);
491 void (*remove)(struct vdpa_device *vdev);
508 static inline struct vdpa_device *dev_to_vdpa(struct device *_dev) in dev_to_vdpa()
510 return container_of(_dev, struct vdpa_device, dev); in dev_to_vdpa()
513 static inline void *vdpa_get_drvdata(const struct vdpa_device *vdev) in vdpa_get_drvdata()
518 static inline void vdpa_set_drvdata(struct vdpa_device *vdev, void *data) in vdpa_set_drvdata()
523 static inline struct device *vdpa_get_dma_dev(struct vdpa_device *vdev) in vdpa_get_dma_dev()
528 static inline int vdpa_reset(struct vdpa_device *vdev, u32 flags) in vdpa_reset()
543 static inline int vdpa_set_features_unlocked(struct vdpa_device *vdev, u64 features) in vdpa_set_features_unlocked()
554 static inline int vdpa_set_features(struct vdpa_device *vdev, u64 features) in vdpa_set_features()
565 void vdpa_get_config(struct vdpa_device *vdev, unsigned int offset,
567 void vdpa_set_config(struct vdpa_device *dev, unsigned int offset,
569 void vdpa_set_status(struct vdpa_device *vdev, u8 status);
596 void (*dev_del)(struct vdpa_mgmt_dev *mdev, struct vdpa_device *dev);
597 int (*dev_set_attr)(struct vdpa_mgmt_dev *mdev, struct vdpa_device *dev,