Lines Matching refs:vdpa

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