Lines Matching refs:vdpa
77 static struct vdpasim *vdpa_to_sim(struct vdpa_device *vdpa) in vdpa_to_sim() argument
79 return container_of(vdpa, struct vdpasim, vdpa); in vdpa_to_sim()
197 struct vdpa_device *vdpa; in vdpasim_create() local
218 vdpa = __vdpa_alloc_device(NULL, ops, in vdpasim_create()
222 if (IS_ERR(vdpa)) { in vdpasim_create()
223 ret = PTR_ERR(vdpa); in vdpasim_create()
227 vdpasim = vdpa_to_sim(vdpa); in vdpasim_create()
229 dev = &vdpasim->vdpa.dev; in vdpasim_create()
243 vdpasim->vdpa.mdev = dev_attr->mgmt_dev; in vdpasim_create()
275 vdpasim->vdpa.dma_dev = dev; in vdpasim_create()
292 static int vdpasim_set_vq_address(struct vdpa_device *vdpa, u16 idx, in vdpasim_set_vq_address() argument
296 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_set_vq_address()
306 static void vdpasim_set_vq_num(struct vdpa_device *vdpa, u16 idx, u32 num) in vdpasim_set_vq_num() argument
308 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_set_vq_num()
314 static u16 vdpasim_get_vq_size(struct vdpa_device *vdpa, u16 idx) in vdpasim_get_vq_size() argument
316 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_get_vq_size()
325 static void vdpasim_kick_vq(struct vdpa_device *vdpa, u16 idx) in vdpasim_kick_vq() argument
327 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_kick_vq()
340 static void vdpasim_set_vq_cb(struct vdpa_device *vdpa, u16 idx, in vdpasim_set_vq_cb() argument
343 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_set_vq_cb()
350 static void vdpasim_set_vq_ready(struct vdpa_device *vdpa, u16 idx, bool ready) in vdpasim_set_vq_ready() argument
352 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_set_vq_ready()
365 static bool vdpasim_get_vq_ready(struct vdpa_device *vdpa, u16 idx) in vdpasim_get_vq_ready() argument
367 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_get_vq_ready()
373 static int vdpasim_set_vq_state(struct vdpa_device *vdpa, u16 idx, in vdpasim_set_vq_state() argument
376 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_set_vq_state()
387 static int vdpasim_get_vq_state(struct vdpa_device *vdpa, u16 idx, in vdpasim_get_vq_state() argument
390 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_get_vq_state()
398 static int vdpasim_get_vq_stats(struct vdpa_device *vdpa, u16 idx, in vdpasim_get_vq_stats() argument
402 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_get_vq_stats()
410 static u32 vdpasim_get_vq_align(struct vdpa_device *vdpa) in vdpasim_get_vq_align() argument
415 static u32 vdpasim_get_vq_group(struct vdpa_device *vdpa, u16 idx) in vdpasim_get_vq_group() argument
424 static u64 vdpasim_get_device_features(struct vdpa_device *vdpa) in vdpasim_get_device_features() argument
426 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_get_device_features()
431 static u64 vdpasim_get_backend_features(const struct vdpa_device *vdpa) in vdpasim_get_backend_features() argument
436 static int vdpasim_set_driver_features(struct vdpa_device *vdpa, u64 features) in vdpasim_set_driver_features() argument
438 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_set_driver_features()
449 static u64 vdpasim_get_driver_features(struct vdpa_device *vdpa) in vdpasim_get_driver_features() argument
451 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_get_driver_features()
456 static void vdpasim_set_config_cb(struct vdpa_device *vdpa, in vdpasim_set_config_cb() argument
462 static u16 vdpasim_get_vq_num_max(struct vdpa_device *vdpa) in vdpasim_get_vq_num_max() argument
467 static u32 vdpasim_get_device_id(struct vdpa_device *vdpa) in vdpasim_get_device_id() argument
469 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_get_device_id()
474 static u32 vdpasim_get_vendor_id(struct vdpa_device *vdpa) in vdpasim_get_vendor_id() argument
479 static u8 vdpasim_get_status(struct vdpa_device *vdpa) in vdpasim_get_status() argument
481 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_get_status()
491 static void vdpasim_set_status(struct vdpa_device *vdpa, u8 status) in vdpasim_set_status() argument
493 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_set_status()
501 static int vdpasim_compat_reset(struct vdpa_device *vdpa, u32 flags) in vdpasim_compat_reset() argument
503 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_compat_reset()
513 static int vdpasim_reset(struct vdpa_device *vdpa) in vdpasim_reset() argument
515 return vdpasim_compat_reset(vdpa, 0); in vdpasim_reset()
518 static int vdpasim_suspend(struct vdpa_device *vdpa) in vdpasim_suspend() argument
520 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_suspend()
529 static int vdpasim_resume(struct vdpa_device *vdpa) in vdpasim_resume() argument
531 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_resume()
540 vdpasim_kick_vq(vdpa, i); in vdpasim_resume()
550 static size_t vdpasim_get_config_size(struct vdpa_device *vdpa) in vdpasim_get_config_size() argument
552 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_get_config_size()
557 static void vdpasim_get_config(struct vdpa_device *vdpa, unsigned int offset, in vdpasim_get_config() argument
560 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_get_config()
571 static void vdpasim_set_config(struct vdpa_device *vdpa, unsigned int offset, in vdpasim_set_config() argument
574 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_set_config()
585 static u32 vdpasim_get_generation(struct vdpa_device *vdpa) in vdpasim_get_generation() argument
587 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_get_generation()
592 static struct vdpa_iova_range vdpasim_get_iova_range(struct vdpa_device *vdpa) in vdpasim_get_iova_range() argument
602 static int vdpasim_set_group_asid(struct vdpa_device *vdpa, unsigned int group, in vdpasim_set_group_asid() argument
605 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_set_group_asid()
620 if (vdpasim_get_vq_group(vdpa, i) == group) in vdpasim_set_group_asid()
629 static int vdpasim_set_map(struct vdpa_device *vdpa, unsigned int asid, in vdpasim_set_map() argument
632 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_set_map()
663 static int vdpasim_reset_map(struct vdpa_device *vdpa, unsigned int asid) in vdpasim_reset_map() argument
665 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_reset_map()
682 static int vdpasim_bind_mm(struct vdpa_device *vdpa, struct mm_struct *mm) in vdpasim_bind_mm() argument
684 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_bind_mm()
695 static void vdpasim_unbind_mm(struct vdpa_device *vdpa) in vdpasim_unbind_mm() argument
697 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_unbind_mm()
706 static int vdpasim_dma_map(struct vdpa_device *vdpa, unsigned int asid, in vdpasim_dma_map() argument
710 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_dma_map()
728 static int vdpasim_dma_unmap(struct vdpa_device *vdpa, unsigned int asid, in vdpasim_dma_unmap() argument
731 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_dma_unmap()
748 static void vdpasim_free(struct vdpa_device *vdpa) in vdpasim_free() argument
750 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_free()