Lines Matching refs:vdpa

17 #include <linux/vdpa.h>
28 struct vdpa_device *vdpa;
53 return to_virtio_vdpa_device(vdev)->vdpa;
59 struct vdpa_device *vdpa = vd_get_vdpa(vdev);
61 vdpa_get_config(vdpa, offset, buf, len);
67 struct vdpa_device *vdpa = vd_get_vdpa(vdev);
68 const struct vdpa_config_ops *ops = vdpa->config;
70 ops->set_config(vdpa, offset, buf, len);
75 struct vdpa_device *vdpa = vd_get_vdpa(vdev);
76 const struct vdpa_config_ops *ops = vdpa->config;
79 return ops->get_generation(vdpa);
86 struct vdpa_device *vdpa = vd_get_vdpa(vdev);
87 const struct vdpa_config_ops *ops = vdpa->config;
89 return ops->get_status(vdpa);
94 struct vdpa_device *vdpa = vd_get_vdpa(vdev);
95 const struct vdpa_config_ops *ops = vdpa->config;
97 return ops->set_status(vdpa, status);
102 struct vdpa_device *vdpa = vd_get_vdpa(vdev);
104 vdpa_reset(vdpa);
109 struct vdpa_device *vdpa = vd_get_vdpa(vq->vdev);
110 const struct vdpa_config_ops *ops = vdpa->config;
112 ops->kick_vq(vdpa, vq->index);
139 struct vdpa_device *vdpa = vd_get_vdpa(vdev);
140 const struct vdpa_config_ops *ops = vdpa->config;
152 if (index >= vdpa->nvqs)
156 if (ops->get_vq_ready(vdpa, index))
164 num = ops->get_vq_num_max(vdpa);
171 align = ops->get_vq_align(vdpa);
183 ops->set_vq_cb(vdpa, index, &cb);
184 ops->set_vq_num(vdpa, index, virtqueue_get_vring_size(vq));
190 if (ops->set_vq_address(vdpa, index,
197 ops->set_vq_ready(vdpa, index, 1);
211 ops->set_vq_ready(vdpa, index, 0);
213 WARN_ON(ops->get_vq_ready(vdpa, index));
221 struct vdpa_device *vdpa = vd_dev->vdpa;
222 const struct vdpa_config_ops *ops = vdpa->config;
232 ops->set_vq_ready(vdpa, index, 0);
233 WARN_ON(ops->get_vq_ready(vdpa, index));
256 struct vdpa_device *vdpa = vd_get_vdpa(vdev);
257 const struct vdpa_config_ops *ops = vdpa->config;
278 ops->set_config_cb(vdpa, &cb);
289 struct vdpa_device *vdpa = vd_get_vdpa(vdev);
290 const struct vdpa_config_ops *ops = vdpa->config;
292 return ops->get_features(vdpa);
297 struct vdpa_device *vdpa = vd_get_vdpa(vdev);
302 return vdpa_set_features(vdpa, vdev->features);
308 struct vdpa_device *vdpa = vd_dev->vdpa;
310 return dev_name(&vdpa->dev);
337 static int virtio_vdpa_probe(struct vdpa_device *vdpa)
339 const struct vdpa_config_ops *ops = vdpa->config;
347 vd_dev->vdev.dev.parent = vdpa_get_dma_dev(vdpa);
350 vd_dev->vdpa = vdpa;
354 vd_dev->vdev.id.device = ops->get_device_id(vdpa);
358 vd_dev->vdev.id.vendor = ops->get_vendor_id(vdpa);
364 vdpa_set_drvdata(vdpa, vd_dev);
376 static void virtio_vdpa_remove(struct vdpa_device *vdpa)
378 struct virtio_vdpa_device *vd_dev = vdpa_get_drvdata(vdpa);