Lines Matching refs:vdpa_device
73 struct vdpa_device { struct
244 int (*set_vq_address)(struct vdpa_device *vdev,
247 void (*set_vq_num)(struct vdpa_device *vdev, u16 idx, u32 num);
248 void (*kick_vq)(struct vdpa_device *vdev, u16 idx);
249 void (*set_vq_cb)(struct vdpa_device *vdev, u16 idx,
251 void (*set_vq_ready)(struct vdpa_device *vdev, u16 idx, bool ready);
252 bool (*get_vq_ready)(struct vdpa_device *vdev, u16 idx);
253 int (*set_vq_state)(struct vdpa_device *vdev, u16 idx,
255 int (*get_vq_state)(struct vdpa_device *vdev, u16 idx,
258 (*get_vq_notification)(struct vdpa_device *vdev, u16 idx);
260 int (*get_vq_irq)(struct vdpa_device *vdv, u16 idx);
263 u32 (*get_vq_align)(struct vdpa_device *vdev);
264 u64 (*get_features)(struct vdpa_device *vdev);
265 int (*set_features)(struct vdpa_device *vdev, u64 features);
266 void (*set_config_cb)(struct vdpa_device *vdev,
268 u16 (*get_vq_num_max)(struct vdpa_device *vdev);
269 u32 (*get_device_id)(struct vdpa_device *vdev);
270 u32 (*get_vendor_id)(struct vdpa_device *vdev);
271 u8 (*get_status)(struct vdpa_device *vdev);
272 void (*set_status)(struct vdpa_device *vdev, u8 status);
273 int (*reset)(struct vdpa_device *vdev);
274 size_t (*get_config_size)(struct vdpa_device *vdev);
275 void (*get_config)(struct vdpa_device *vdev, unsigned int offset,
277 void (*set_config)(struct vdpa_device *vdev, unsigned int offset,
279 u32 (*get_generation)(struct vdpa_device *vdev);
280 struct vdpa_iova_range (*get_iova_range)(struct vdpa_device *vdev);
283 int (*set_map)(struct vdpa_device *vdev, struct vhost_iotlb *iotlb);
284 int (*dma_map)(struct vdpa_device *vdev, u64 iova, u64 size,
286 int (*dma_unmap)(struct vdpa_device *vdev, u64 iova, u64 size);
289 void (*free)(struct vdpa_device *vdev);
292 struct vdpa_device *__vdpa_alloc_device(struct device *parent,
317 int vdpa_register_device(struct vdpa_device *vdev, int nvqs);
318 void vdpa_unregister_device(struct vdpa_device *vdev);
320 int _vdpa_register_device(struct vdpa_device *vdev, int nvqs);
321 void _vdpa_unregister_device(struct vdpa_device *vdev);
331 int (*probe)(struct vdpa_device *vdev);
332 void (*remove)(struct vdpa_device *vdev);
349 static inline struct vdpa_device *dev_to_vdpa(struct device *_dev) in dev_to_vdpa()
351 return container_of(_dev, struct vdpa_device, dev); in dev_to_vdpa()
354 static inline void *vdpa_get_drvdata(const struct vdpa_device *vdev) in vdpa_get_drvdata()
359 static inline void vdpa_set_drvdata(struct vdpa_device *vdev, void *data) in vdpa_set_drvdata()
364 static inline struct device *vdpa_get_dma_dev(struct vdpa_device *vdev) in vdpa_get_dma_dev()
369 static inline int vdpa_reset(struct vdpa_device *vdev) in vdpa_reset()
377 static inline int vdpa_set_features(struct vdpa_device *vdev, u64 features) in vdpa_set_features()
385 static inline void vdpa_get_config(struct vdpa_device *vdev, in vdpa_get_config()
416 void (*dev_del)(struct vdpa_mgmt_dev *mdev, struct vdpa_device *dev);