Lines Matching refs:vdpa
18 #include <linux/vdpa.h>
20 #include <uapi/linux/vdpa.h>
77 static struct vdpasim *vdpa_to_sim(struct vdpa_device *vdpa)
79 return container_of(vdpa, struct vdpasim, vdpa);
195 struct vdpa_device *vdpa;
216 vdpa = __vdpa_alloc_device(NULL, ops,
220 if (IS_ERR(vdpa)) {
221 ret = PTR_ERR(vdpa);
225 vdpasim = vdpa_to_sim(vdpa);
227 dev = &vdpasim->vdpa.dev;
241 vdpasim->vdpa.mdev = dev_attr->mgmt_dev;
269 vdpasim->vdpa.dma_dev = dev;
286 static int vdpasim_set_vq_address(struct vdpa_device *vdpa, u16 idx,
290 struct vdpasim *vdpasim = vdpa_to_sim(vdpa);
300 static void vdpasim_set_vq_num(struct vdpa_device *vdpa, u16 idx, u32 num)
302 struct vdpasim *vdpasim = vdpa_to_sim(vdpa);
308 static void vdpasim_kick_vq(struct vdpa_device *vdpa, u16 idx)
310 struct vdpasim *vdpasim = vdpa_to_sim(vdpa);
323 static void vdpasim_set_vq_cb(struct vdpa_device *vdpa, u16 idx,
326 struct vdpasim *vdpasim = vdpa_to_sim(vdpa);
333 static void vdpasim_set_vq_ready(struct vdpa_device *vdpa, u16 idx, bool ready)
335 struct vdpasim *vdpasim = vdpa_to_sim(vdpa);
348 static bool vdpasim_get_vq_ready(struct vdpa_device *vdpa, u16 idx)
350 struct vdpasim *vdpasim = vdpa_to_sim(vdpa);
356 static int vdpasim_set_vq_state(struct vdpa_device *vdpa, u16 idx,
359 struct vdpasim *vdpasim = vdpa_to_sim(vdpa);
370 static int vdpasim_get_vq_state(struct vdpa_device *vdpa, u16 idx,
373 struct vdpasim *vdpasim = vdpa_to_sim(vdpa);
381 static int vdpasim_get_vq_stats(struct vdpa_device *vdpa, u16 idx,
385 struct vdpasim *vdpasim = vdpa_to_sim(vdpa);
393 static u32 vdpasim_get_vq_align(struct vdpa_device *vdpa)
398 static u32 vdpasim_get_vq_group(struct vdpa_device *vdpa, u16 idx)
407 static u64 vdpasim_get_device_features(struct vdpa_device *vdpa)
409 struct vdpasim *vdpasim = vdpa_to_sim(vdpa);
414 static u64 vdpasim_get_backend_features(const struct vdpa_device *vdpa)
419 static int vdpasim_set_driver_features(struct vdpa_device *vdpa, u64 features)
421 struct vdpasim *vdpasim = vdpa_to_sim(vdpa);
432 static u64 vdpasim_get_driver_features(struct vdpa_device *vdpa)
434 struct vdpasim *vdpasim = vdpa_to_sim(vdpa);
439 static void vdpasim_set_config_cb(struct vdpa_device *vdpa,
445 static u16 vdpasim_get_vq_num_max(struct vdpa_device *vdpa)
450 static u32 vdpasim_get_device_id(struct vdpa_device *vdpa)
452 struct vdpasim *vdpasim = vdpa_to_sim(vdpa);
457 static u32 vdpasim_get_vendor_id(struct vdpa_device *vdpa)
462 static u8 vdpasim_get_status(struct vdpa_device *vdpa)
464 struct vdpasim *vdpasim = vdpa_to_sim(vdpa);
474 static void vdpasim_set_status(struct vdpa_device *vdpa, u8 status)
476 struct vdpasim *vdpasim = vdpa_to_sim(vdpa);
484 static int vdpasim_reset(struct vdpa_device *vdpa)
486 struct vdpasim *vdpasim = vdpa_to_sim(vdpa);
496 static int vdpasim_suspend(struct vdpa_device *vdpa)
498 struct vdpasim *vdpasim = vdpa_to_sim(vdpa);
507 static int vdpasim_resume(struct vdpa_device *vdpa)
509 struct vdpasim *vdpasim = vdpa_to_sim(vdpa);
518 vdpasim_kick_vq(vdpa, i);
528 static size_t vdpasim_get_config_size(struct vdpa_device *vdpa)
530 struct vdpasim *vdpasim = vdpa_to_sim(vdpa);
535 static void vdpasim_get_config(struct vdpa_device *vdpa, unsigned int offset,
538 struct vdpasim *vdpasim = vdpa_to_sim(vdpa);
549 static void vdpasim_set_config(struct vdpa_device *vdpa, unsigned int offset,
552 struct vdpasim *vdpasim = vdpa_to_sim(vdpa);
563 static u32 vdpasim_get_generation(struct vdpa_device *vdpa)
565 struct vdpasim *vdpasim = vdpa_to_sim(vdpa);
570 static struct vdpa_iova_range vdpasim_get_iova_range(struct vdpa_device *vdpa)
580 static int vdpasim_set_group_asid(struct vdpa_device *vdpa, unsigned int group,
583 struct vdpasim *vdpasim = vdpa_to_sim(vdpa);
598 if (vdpasim_get_vq_group(vdpa, i) == group)
607 static int vdpasim_set_map(struct vdpa_device *vdpa, unsigned int asid,
610 struct vdpasim *vdpasim = vdpa_to_sim(vdpa);
641 static int vdpasim_bind_mm(struct vdpa_device *vdpa, struct mm_struct *mm)
643 struct vdpasim *vdpasim = vdpa_to_sim(vdpa);
654 static void vdpasim_unbind_mm(struct vdpa_device *vdpa)
656 struct vdpasim *vdpasim = vdpa_to_sim(vdpa);
665 static int vdpasim_dma_map(struct vdpa_device *vdpa, unsigned int asid,
669 struct vdpasim *vdpasim = vdpa_to_sim(vdpa);
687 static int vdpasim_dma_unmap(struct vdpa_device *vdpa, unsigned int asid,
690 struct vdpasim *vdpasim = vdpa_to_sim(vdpa);
707 static void vdpasim_free(struct vdpa_device *vdpa)
709 struct vdpasim *vdpasim = vdpa_to_sim(vdpa);