Lines Matching refs:vdpa_dev

19 static u64 pds_vdpa_get_driver_features(struct vdpa_device *vdpa_dev);
21 static struct pds_vdpa_device *vdpa_to_pdsv(struct vdpa_device *vdpa_dev) in vdpa_to_pdsv() argument
23 return container_of(vdpa_dev, struct pds_vdpa_device, vdpa_dev); in vdpa_to_pdsv()
72 static int pds_vdpa_set_vq_address(struct vdpa_device *vdpa_dev, u16 qid, in pds_vdpa_set_vq_address() argument
75 struct pds_vdpa_device *pdsv = vdpa_to_pdsv(vdpa_dev); in pds_vdpa_set_vq_address()
84 static void pds_vdpa_set_vq_num(struct vdpa_device *vdpa_dev, u16 qid, u32 num) in pds_vdpa_set_vq_num() argument
86 struct pds_vdpa_device *pdsv = vdpa_to_pdsv(vdpa_dev); in pds_vdpa_set_vq_num()
91 static void pds_vdpa_kick_vq(struct vdpa_device *vdpa_dev, u16 qid) in pds_vdpa_kick_vq() argument
93 struct pds_vdpa_device *pdsv = vdpa_to_pdsv(vdpa_dev); in pds_vdpa_kick_vq()
98 static void pds_vdpa_set_vq_cb(struct vdpa_device *vdpa_dev, u16 qid, in pds_vdpa_set_vq_cb() argument
101 struct pds_vdpa_device *pdsv = vdpa_to_pdsv(vdpa_dev); in pds_vdpa_set_vq_cb()
126 static void pds_vdpa_set_vq_ready(struct vdpa_device *vdpa_dev, u16 qid, bool ready) in pds_vdpa_set_vq_ready() argument
128 struct pds_vdpa_device *pdsv = vdpa_to_pdsv(vdpa_dev); in pds_vdpa_set_vq_ready()
129 struct device *dev = &pdsv->vdpa_dev.dev; in pds_vdpa_set_vq_ready()
139 driver_features = pds_vdpa_get_driver_features(vdpa_dev); in pds_vdpa_set_vq_ready()
164 static bool pds_vdpa_get_vq_ready(struct vdpa_device *vdpa_dev, u16 qid) in pds_vdpa_get_vq_ready() argument
166 struct pds_vdpa_device *pdsv = vdpa_to_pdsv(vdpa_dev); in pds_vdpa_get_vq_ready()
171 static int pds_vdpa_set_vq_state(struct vdpa_device *vdpa_dev, u16 qid, in pds_vdpa_set_vq_state() argument
174 struct pds_vdpa_device *pdsv = vdpa_to_pdsv(vdpa_dev); in pds_vdpa_set_vq_state()
186 driver_features = pds_vdpa_get_driver_features(vdpa_dev); in pds_vdpa_set_vq_state()
221 static int pds_vdpa_get_vq_state(struct vdpa_device *vdpa_dev, u16 qid, in pds_vdpa_get_vq_state() argument
224 struct pds_vdpa_device *pdsv = vdpa_to_pdsv(vdpa_dev); in pds_vdpa_get_vq_state()
239 driver_features = pds_vdpa_get_driver_features(vdpa_dev); in pds_vdpa_get_vq_state()
257 pds_vdpa_get_vq_notification(struct vdpa_device *vdpa_dev, u16 qid) in pds_vdpa_get_vq_notification() argument
259 struct pds_vdpa_device *pdsv = vdpa_to_pdsv(vdpa_dev); in pds_vdpa_get_vq_notification()
274 static int pds_vdpa_get_vq_irq(struct vdpa_device *vdpa_dev, u16 qid) in pds_vdpa_get_vq_irq() argument
276 struct pds_vdpa_device *pdsv = vdpa_to_pdsv(vdpa_dev); in pds_vdpa_get_vq_irq()
281 static u32 pds_vdpa_get_vq_align(struct vdpa_device *vdpa_dev) in pds_vdpa_get_vq_align() argument
286 static u32 pds_vdpa_get_vq_group(struct vdpa_device *vdpa_dev, u16 idx) in pds_vdpa_get_vq_group() argument
291 static u64 pds_vdpa_get_device_features(struct vdpa_device *vdpa_dev) in pds_vdpa_get_device_features() argument
293 struct pds_vdpa_device *pdsv = vdpa_to_pdsv(vdpa_dev); in pds_vdpa_get_device_features()
298 static int pds_vdpa_set_driver_features(struct vdpa_device *vdpa_dev, u64 features) in pds_vdpa_set_driver_features() argument
300 struct pds_vdpa_device *pdsv = vdpa_to_pdsv(vdpa_dev); in pds_vdpa_set_driver_features()
301 struct device *dev = &pdsv->vdpa_dev.dev; in pds_vdpa_set_driver_features()
321 driver_features = pds_vdpa_get_driver_features(vdpa_dev); in pds_vdpa_set_driver_features()
339 static u64 pds_vdpa_get_driver_features(struct vdpa_device *vdpa_dev) in pds_vdpa_get_driver_features() argument
341 struct pds_vdpa_device *pdsv = vdpa_to_pdsv(vdpa_dev); in pds_vdpa_get_driver_features()
346 static void pds_vdpa_set_config_cb(struct vdpa_device *vdpa_dev, in pds_vdpa_set_config_cb() argument
349 struct pds_vdpa_device *pdsv = vdpa_to_pdsv(vdpa_dev); in pds_vdpa_set_config_cb()
355 static u16 pds_vdpa_get_vq_num_max(struct vdpa_device *vdpa_dev) in pds_vdpa_get_vq_num_max() argument
357 struct pds_vdpa_device *pdsv = vdpa_to_pdsv(vdpa_dev); in pds_vdpa_get_vq_num_max()
363 static u32 pds_vdpa_get_device_id(struct vdpa_device *vdpa_dev) in pds_vdpa_get_device_id() argument
368 static u32 pds_vdpa_get_vendor_id(struct vdpa_device *vdpa_dev) in pds_vdpa_get_vendor_id() argument
373 static u8 pds_vdpa_get_status(struct vdpa_device *vdpa_dev) in pds_vdpa_get_status() argument
375 struct pds_vdpa_device *pdsv = vdpa_to_pdsv(vdpa_dev); in pds_vdpa_get_status()
384 struct device *dev = &pdsv->vdpa_dev.dev; in pds_vdpa_request_irqs()
446 static void pds_vdpa_set_status(struct vdpa_device *vdpa_dev, u8 status) in pds_vdpa_set_status() argument
448 struct pds_vdpa_device *pdsv = vdpa_to_pdsv(vdpa_dev); in pds_vdpa_set_status()
449 struct device *dev = &pdsv->vdpa_dev.dev; in pds_vdpa_set_status()
453 old_status = pds_vdpa_get_status(vdpa_dev); in pds_vdpa_set_status()
466 pds_vdpa_set_config_cb(vdpa_dev, &null_cb); in pds_vdpa_set_status()
500 static int pds_vdpa_reset(struct vdpa_device *vdpa_dev) in pds_vdpa_reset() argument
502 struct pds_vdpa_device *pdsv = vdpa_to_pdsv(vdpa_dev); in pds_vdpa_reset()
509 status = pds_vdpa_get_status(vdpa_dev); in pds_vdpa_reset()
524 pds_vdpa_set_status(vdpa_dev, 0); in pds_vdpa_reset()
535 static size_t pds_vdpa_get_config_size(struct vdpa_device *vdpa_dev) in pds_vdpa_get_config_size() argument
540 static void pds_vdpa_get_config(struct vdpa_device *vdpa_dev, in pds_vdpa_get_config() argument
544 struct pds_vdpa_device *pdsv = vdpa_to_pdsv(vdpa_dev); in pds_vdpa_get_config()
556 static void pds_vdpa_set_config(struct vdpa_device *vdpa_dev, in pds_vdpa_set_config() argument
560 struct pds_vdpa_device *pdsv = vdpa_to_pdsv(vdpa_dev); in pds_vdpa_set_config()
627 pdsv = vdpa_alloc_device(struct pds_vdpa_device, vdpa_dev, in pds_vdpa_dev_add()
639 pdsv->vdpa_dev.dma_dev = dma_dev; in pds_vdpa_dev_add()
722 pdsv->vdpa_dev.mdev = &vdpa_aux->vdpa_mdev; in pds_vdpa_dev_add()
735 err = _vdpa_register_device(&pdsv->vdpa_dev, pdsv->num_vqs); in pds_vdpa_dev_add()
748 put_device(&pdsv->vdpa_dev.dev); in pds_vdpa_dev_add()
754 struct vdpa_device *vdpa_dev) in pds_vdpa_dev_del() argument
756 struct pds_vdpa_device *pdsv = vdpa_to_pdsv(vdpa_dev); in pds_vdpa_dev_del()
762 _vdpa_unregister_device(vdpa_dev); in pds_vdpa_dev_del()