Lines Matching refs:vhost_vdpa

36     struct vhost_vdpa vhost_vdpa;  member
242 if (s->vhost_vdpa.index != 0) { in vhost_vdpa_cleanup()
245 qemu_close(s->vhost_vdpa.shared->device_fd); in vhost_vdpa_cleanup()
246 g_free(s->vhost_vdpa.shared); in vhost_vdpa_cleanup()
310 struct vhost_vdpa *v = &s->vhost_vdpa; in vhost_vdpa_net_log_global_enable()
316 if (s->vhost_vdpa.shadow_vqs_enabled == enable) { in vhost_vdpa_net_log_global_enable()
361 struct vhost_vdpa *v = &s->vhost_vdpa; in vhost_vdpa_net_data_start_first()
374 struct vhost_vdpa *v = &s->vhost_vdpa; in vhost_vdpa_net_data_start()
396 struct vhost_vdpa *v = &s->vhost_vdpa; in vhost_vdpa_net_data_load()
419 if (s->vhost_vdpa.index == 0) { in vhost_vdpa_net_client_stop()
423 dev = s->vhost_vdpa.dev; in vhost_vdpa_net_client_stop()
425 g_clear_pointer(&s->vhost_vdpa.shared->iova_tree, in vhost_vdpa_net_client_stop()
461 static int vhost_vdpa_set_address_space_id(struct vhost_vdpa *v, in vhost_vdpa_set_address_space_id()
481 static void vhost_vdpa_cvq_unmap_buf(struct vhost_vdpa *v, void *addr) in vhost_vdpa_cvq_unmap_buf()
509 static int vhost_vdpa_cvq_map_buf(struct vhost_vdpa *v, void *buf, size_t size, in vhost_vdpa_cvq_map_buf()
540 struct vhost_vdpa *v; in vhost_vdpa_net_cvq_start()
548 v = &s->vhost_vdpa; in vhost_vdpa_net_cvq_start()
551 v->shadow_vqs_enabled = s0->vhost_vdpa.shadow_vqs_enabled; in vhost_vdpa_net_cvq_start()
552 s->vhost_vdpa.address_space_id = VHOST_VDPA_GUEST_PA_ASID; in vhost_vdpa_net_cvq_start()
585 s->vhost_vdpa.address_space_id = VHOST_VDPA_NET_CVQ_ASID; in vhost_vdpa_net_cvq_start()
588 if (!s->vhost_vdpa.shadow_vqs_enabled) { in vhost_vdpa_net_cvq_start()
610 r = vhost_vdpa_cvq_map_buf(&s->vhost_vdpa, s->cvq_cmd_out_buffer, in vhost_vdpa_net_cvq_start()
616 r = vhost_vdpa_cvq_map_buf(&s->vhost_vdpa, s->status, in vhost_vdpa_net_cvq_start()
619 vhost_vdpa_cvq_unmap_buf(&s->vhost_vdpa, s->cvq_cmd_out_buffer); in vhost_vdpa_net_cvq_start()
631 if (s->vhost_vdpa.shadow_vqs_enabled) { in vhost_vdpa_net_cvq_stop()
632 vhost_vdpa_cvq_unmap_buf(&s->vhost_vdpa, s->cvq_cmd_out_buffer); in vhost_vdpa_net_cvq_stop()
633 vhost_vdpa_cvq_unmap_buf(&s->vhost_vdpa, s->status); in vhost_vdpa_net_cvq_stop()
643 VhostShadowVirtqueue *svq = g_ptr_array_index(s->vhost_vdpa.shadow_vqs, 0); in vhost_vdpa_net_cvq_add()
665 VhostShadowVirtqueue *svq = g_ptr_array_index(s->vhost_vdpa.shadow_vqs, 0); in vhost_vdpa_net_svq_poll()
721 VhostShadowVirtqueue *svq = g_ptr_array_index(s->vhost_vdpa.shadow_vqs, 0); in vhost_vdpa_net_load_cmd()
1239 struct vhost_vdpa *v = &s->vhost_vdpa; in vhost_vdpa_net_cvq_load()
1707 s->vhost_vdpa.index = queue_pair_index; in net_vhost_vdpa_init()
1710 s->vhost_vdpa.shadow_vqs_enabled = svq; in net_vhost_vdpa_init()
1713 &s->vhost_vdpa.migration_blocker); in net_vhost_vdpa_init()
1714 s->vhost_vdpa.shared = g_new0(VhostVDPAShared, 1); in net_vhost_vdpa_init()
1715 s->vhost_vdpa.shared->device_fd = vdpa_device_fd; in net_vhost_vdpa_init()
1716 s->vhost_vdpa.shared->iova_range = iova_range; in net_vhost_vdpa_init()
1717 s->vhost_vdpa.shared->shadow_data = svq; in net_vhost_vdpa_init()
1726 s->vhost_vdpa.shadow_vq_ops = &vhost_vdpa_net_svq_ops; in net_vhost_vdpa_init()
1727 s->vhost_vdpa.shadow_vq_ops_opaque = s; in net_vhost_vdpa_init()
1731 s->vhost_vdpa.shared = shared; in net_vhost_vdpa_init()
1734 ret = vhost_vdpa_add(nc, (void *)&s->vhost_vdpa, queue_pair_index, nvqs); in net_vhost_vdpa_init()
1799 opts = &netdev->u.vhost_vdpa; in net_init_vhost_vdpa()
1855 shared = DO_UPCAST(VhostVDPAState, nc, ncs[0])->vhost_vdpa.shared; in net_init_vhost_vdpa()
1866 VhostVDPAShared *shared = s0->vhost_vdpa.shared; in net_init_vhost_vdpa()