Lines Matching refs:vdpa

41 	struct vdpa_device *vdpa;  member
62 const struct vdpa_config_ops *ops = v->vdpa->config; in handle_vq_kick()
64 ops->kick_vq(v->vdpa, vq - v->vqs); in handle_vq_kick()
92 const struct vdpa_config_ops *ops = v->vdpa->config; in vhost_vdpa_setup_vq_irq()
93 struct vdpa_device *vdpa = v->vdpa; in vhost_vdpa_setup_vq_irq() local
99 irq = ops->get_vq_irq(vdpa, qid); in vhost_vdpa_setup_vq_irq()
124 struct vdpa_device *vdpa = v->vdpa; in vhost_vdpa_reset() local
126 vdpa_reset(vdpa); in vhost_vdpa_reset()
132 struct vdpa_device *vdpa = v->vdpa; in vhost_vdpa_get_device_id() local
133 const struct vdpa_config_ops *ops = vdpa->config; in vhost_vdpa_get_device_id()
136 device_id = ops->get_device_id(vdpa); in vhost_vdpa_get_device_id()
146 struct vdpa_device *vdpa = v->vdpa; in vhost_vdpa_get_status() local
147 const struct vdpa_config_ops *ops = vdpa->config; in vhost_vdpa_get_status()
150 status = ops->get_status(vdpa); in vhost_vdpa_get_status()
160 struct vdpa_device *vdpa = v->vdpa; in vhost_vdpa_set_status() local
161 const struct vdpa_config_ops *ops = vdpa->config; in vhost_vdpa_set_status()
169 status_old = ops->get_status(vdpa); in vhost_vdpa_set_status()
175 if (status != 0 && (ops->get_status(vdpa) & ~status) != 0) in vhost_vdpa_set_status()
178 ops->set_status(vdpa, status); in vhost_vdpa_set_status()
214 struct vdpa_device *vdpa = v->vdpa; in vhost_vdpa_get_config() local
227 vdpa_get_config(vdpa, config.off, buf, config.len); in vhost_vdpa_get_config()
241 struct vdpa_device *vdpa = v->vdpa; in vhost_vdpa_set_config() local
242 const struct vdpa_config_ops *ops = vdpa->config; in vhost_vdpa_set_config()
260 ops->set_config(vdpa, config.off, buf, config.len); in vhost_vdpa_set_config()
268 struct vdpa_device *vdpa = v->vdpa; in vhost_vdpa_get_features() local
269 const struct vdpa_config_ops *ops = vdpa->config; in vhost_vdpa_get_features()
272 features = ops->get_features(vdpa); in vhost_vdpa_get_features()
282 struct vdpa_device *vdpa = v->vdpa; in vhost_vdpa_set_features() local
283 const struct vdpa_config_ops *ops = vdpa->config; in vhost_vdpa_set_features()
290 if (ops->get_status(vdpa) & VIRTIO_CONFIG_S_FEATURES_OK) in vhost_vdpa_set_features()
296 if (vdpa_set_features(vdpa, features)) in vhost_vdpa_set_features()
304 struct vdpa_device *vdpa = v->vdpa; in vhost_vdpa_get_vring_num() local
305 const struct vdpa_config_ops *ops = vdpa->config; in vhost_vdpa_get_vring_num()
308 num = ops->get_vq_num_max(vdpa); in vhost_vdpa_get_vring_num()
348 v->vdpa->config->set_config_cb(v->vdpa, &cb); in vhost_vdpa_set_config_call()
368 struct vdpa_device *vdpa = v->vdpa; in vhost_vdpa_vring_ioctl() local
369 const struct vdpa_config_ops *ops = vdpa->config; in vhost_vdpa_vring_ioctl()
391 ops->set_vq_ready(vdpa, idx, s.num); in vhost_vdpa_vring_ioctl()
394 r = ops->get_vq_state(v->vdpa, idx, &vq_state); in vhost_vdpa_vring_ioctl()
408 if (ops->set_vq_address(vdpa, idx, in vhost_vdpa_vring_ioctl()
417 if (ops->set_vq_state(vdpa, idx, &vq_state)) in vhost_vdpa_vring_ioctl()
429 ops->set_vq_cb(vdpa, idx, &cb); in vhost_vdpa_vring_ioctl()
434 ops->set_vq_num(vdpa, idx, vq->num); in vhost_vdpa_vring_ioctl()
570 struct vdpa_device *vdpa = v->vdpa; in vhost_vdpa_map() local
571 const struct vdpa_config_ops *ops = vdpa->config; in vhost_vdpa_map()
580 r = ops->dma_map(vdpa, iova, size, pa, perm); in vhost_vdpa_map()
583 r = ops->set_map(vdpa, dev->iotlb); in vhost_vdpa_map()
600 struct vdpa_device *vdpa = v->vdpa; in vhost_vdpa_unmap() local
601 const struct vdpa_config_ops *ops = vdpa->config; in vhost_vdpa_unmap()
606 ops->dma_unmap(vdpa, iova, size); in vhost_vdpa_unmap()
609 ops->set_map(vdpa, dev->iotlb); in vhost_vdpa_unmap()
752 struct vdpa_device *vdpa = v->vdpa; in vhost_vdpa_process_iotlb_msg() local
753 const struct vdpa_config_ops *ops = vdpa->config; in vhost_vdpa_process_iotlb_msg()
774 ops->set_map(vdpa, dev->iotlb); in vhost_vdpa_process_iotlb_msg()
799 struct vdpa_device *vdpa = v->vdpa; in vhost_vdpa_alloc_domain() local
800 const struct vdpa_config_ops *ops = vdpa->config; in vhost_vdpa_alloc_domain()
801 struct device *dma_dev = vdpa_get_dma_dev(vdpa); in vhost_vdpa_alloc_domain()
833 struct vdpa_device *vdpa = v->vdpa; in vhost_vdpa_free_domain() local
834 struct device *dma_dev = vdpa_get_dma_dev(vdpa); in vhost_vdpa_free_domain()
848 struct vdpa_device *vdpa = v->vdpa; in vhost_vdpa_set_iova_range() local
849 const struct vdpa_config_ops *ops = vdpa->config; in vhost_vdpa_set_iova_range()
852 *range = ops->get_iova_range(vdpa); in vhost_vdpa_set_iova_range()
954 struct vdpa_device *vdpa = v->vdpa; in vhost_vdpa_fault() local
955 const struct vdpa_config_ops *ops = vdpa->config; in vhost_vdpa_fault()
960 notify = ops->get_vq_notification(vdpa, index); in vhost_vdpa_fault()
978 struct vdpa_device *vdpa = v->vdpa; in vhost_vdpa_mmap() local
979 const struct vdpa_config_ops *ops = vdpa->config; in vhost_vdpa_mmap()
998 notify = ops->get_vq_notification(vdpa, index); in vhost_vdpa_mmap()
1032 static int vhost_vdpa_probe(struct vdpa_device *vdpa) in vhost_vdpa_probe() argument
1034 const struct vdpa_config_ops *ops = vdpa->config; in vhost_vdpa_probe()
1040 if (ops->get_device_id(vdpa) != VIRTIO_ID_NET) in vhost_vdpa_probe()
1056 v->vdpa = vdpa; in vhost_vdpa_probe()
1057 v->nvqs = vdpa->nvqs; in vhost_vdpa_probe()
1058 v->virtio_id = ops->get_device_id(vdpa); in vhost_vdpa_probe()
1062 v->dev.parent = &vdpa->dev; in vhost_vdpa_probe()
1083 vdpa_set_drvdata(vdpa, v); in vhost_vdpa_probe()
1092 static void vhost_vdpa_remove(struct vdpa_device *vdpa) in vhost_vdpa_remove() argument
1094 struct vhost_vdpa *v = vdpa_get_drvdata(vdpa); in vhost_vdpa_remove()