Lines Matching refs:vdpa
42 static struct vdpasim *vdpa_to_sim(struct vdpa_device *vdpa) in vdpa_to_sim() argument
44 return container_of(vdpa, struct vdpasim, vdpa); in vdpa_to_sim()
123 struct vdpa_device *vdpa; in vdpasim_create() local
144 vdpa = __vdpa_alloc_device(NULL, ops, in vdpasim_create()
148 if (IS_ERR(vdpa)) { in vdpasim_create()
149 ret = PTR_ERR(vdpa); in vdpasim_create()
153 vdpasim = vdpa_to_sim(vdpa); in vdpasim_create()
159 dev = &vdpasim->vdpa.dev; in vdpasim_create()
163 vdpasim->vdpa.mdev = dev_attr->mgmt_dev; in vdpasim_create()
195 vdpasim->vdpa.dma_dev = dev; in vdpasim_create()
206 static int vdpasim_set_vq_address(struct vdpa_device *vdpa, u16 idx, in vdpasim_set_vq_address() argument
210 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_set_vq_address()
220 static void vdpasim_set_vq_num(struct vdpa_device *vdpa, u16 idx, u32 num) in vdpasim_set_vq_num() argument
222 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_set_vq_num()
228 static void vdpasim_kick_vq(struct vdpa_device *vdpa, u16 idx) in vdpasim_kick_vq() argument
230 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_kick_vq()
243 static void vdpasim_set_vq_cb(struct vdpa_device *vdpa, u16 idx, in vdpasim_set_vq_cb() argument
246 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_set_vq_cb()
253 static void vdpasim_set_vq_ready(struct vdpa_device *vdpa, u16 idx, bool ready) in vdpasim_set_vq_ready() argument
255 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_set_vq_ready()
268 static bool vdpasim_get_vq_ready(struct vdpa_device *vdpa, u16 idx) in vdpasim_get_vq_ready() argument
270 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_get_vq_ready()
276 static int vdpasim_set_vq_state(struct vdpa_device *vdpa, u16 idx, in vdpasim_set_vq_state() argument
279 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_set_vq_state()
290 static int vdpasim_get_vq_state(struct vdpa_device *vdpa, u16 idx, in vdpasim_get_vq_state() argument
293 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_get_vq_state()
301 static int vdpasim_get_vq_stats(struct vdpa_device *vdpa, u16 idx, in vdpasim_get_vq_stats() argument
305 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_get_vq_stats()
313 static u32 vdpasim_get_vq_align(struct vdpa_device *vdpa) in vdpasim_get_vq_align() argument
318 static u32 vdpasim_get_vq_group(struct vdpa_device *vdpa, u16 idx) in vdpasim_get_vq_group() argument
327 static u64 vdpasim_get_device_features(struct vdpa_device *vdpa) in vdpasim_get_device_features() argument
329 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_get_device_features()
334 static int vdpasim_set_driver_features(struct vdpa_device *vdpa, u64 features) in vdpasim_set_driver_features() argument
336 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_set_driver_features()
347 static u64 vdpasim_get_driver_features(struct vdpa_device *vdpa) in vdpasim_get_driver_features() argument
349 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_get_driver_features()
354 static void vdpasim_set_config_cb(struct vdpa_device *vdpa, in vdpasim_set_config_cb() argument
360 static u16 vdpasim_get_vq_num_max(struct vdpa_device *vdpa) in vdpasim_get_vq_num_max() argument
365 static u32 vdpasim_get_device_id(struct vdpa_device *vdpa) in vdpasim_get_device_id() argument
367 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_get_device_id()
372 static u32 vdpasim_get_vendor_id(struct vdpa_device *vdpa) in vdpasim_get_vendor_id() argument
377 static u8 vdpasim_get_status(struct vdpa_device *vdpa) in vdpasim_get_status() argument
379 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_get_status()
389 static void vdpasim_set_status(struct vdpa_device *vdpa, u8 status) in vdpasim_set_status() argument
391 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_set_status()
398 static int vdpasim_reset(struct vdpa_device *vdpa) in vdpasim_reset() argument
400 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_reset()
410 static int vdpasim_suspend(struct vdpa_device *vdpa) in vdpasim_suspend() argument
412 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_suspend()
421 static int vdpasim_resume(struct vdpa_device *vdpa) in vdpasim_resume() argument
423 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_resume()
432 vdpasim_kick_vq(vdpa, i); in vdpasim_resume()
442 static size_t vdpasim_get_config_size(struct vdpa_device *vdpa) in vdpasim_get_config_size() argument
444 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_get_config_size()
449 static void vdpasim_get_config(struct vdpa_device *vdpa, unsigned int offset, in vdpasim_get_config() argument
452 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_get_config()
463 static void vdpasim_set_config(struct vdpa_device *vdpa, unsigned int offset, in vdpasim_set_config() argument
466 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_set_config()
477 static u32 vdpasim_get_generation(struct vdpa_device *vdpa) in vdpasim_get_generation() argument
479 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_get_generation()
484 static struct vdpa_iova_range vdpasim_get_iova_range(struct vdpa_device *vdpa) in vdpasim_get_iova_range() argument
494 static int vdpasim_set_group_asid(struct vdpa_device *vdpa, unsigned int group, in vdpasim_set_group_asid() argument
497 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_set_group_asid()
512 if (vdpasim_get_vq_group(vdpa, i) == group) in vdpasim_set_group_asid()
521 static int vdpasim_set_map(struct vdpa_device *vdpa, unsigned int asid, in vdpasim_set_map() argument
524 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_set_map()
555 static int vdpasim_dma_map(struct vdpa_device *vdpa, unsigned int asid, in vdpasim_dma_map() argument
559 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_dma_map()
577 static int vdpasim_dma_unmap(struct vdpa_device *vdpa, unsigned int asid, in vdpasim_dma_unmap() argument
580 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_dma_unmap()
597 static void vdpasim_free(struct vdpa_device *vdpa) in vdpasim_free() argument
599 struct vdpasim *vdpasim = vdpa_to_sim(vdpa); in vdpasim_free()