Lines Matching refs:vhost_vdpa
36 struct vhost_vdpa vhost_vdpa; member
234 if (s->vhost_vdpa.index != 0) { in vhost_vdpa_cleanup()
237 qemu_close(s->vhost_vdpa.shared->device_fd); in vhost_vdpa_cleanup()
238 g_free(s->vhost_vdpa.shared); in vhost_vdpa_cleanup()
314 struct vhost_vdpa *v = &s->vhost_vdpa; in vhost_vdpa_net_log_global_enable()
320 if (s->vhost_vdpa.shadow_vqs_enabled == enable) { in vhost_vdpa_net_log_global_enable()
365 struct vhost_vdpa *v = &s->vhost_vdpa; in vhost_vdpa_net_data_start_first()
378 struct vhost_vdpa *v = &s->vhost_vdpa; in vhost_vdpa_net_data_start()
400 struct vhost_vdpa *v = &s->vhost_vdpa; in vhost_vdpa_net_data_load()
423 if (s->vhost_vdpa.index == 0) { in vhost_vdpa_net_client_stop()
427 dev = s->vhost_vdpa.dev; in vhost_vdpa_net_client_stop()
429 g_clear_pointer(&s->vhost_vdpa.shared->iova_tree, in vhost_vdpa_net_client_stop()
466 static int vhost_vdpa_set_address_space_id(struct vhost_vdpa *v, in vhost_vdpa_set_address_space_id()
486 static void vhost_vdpa_cvq_unmap_buf(struct vhost_vdpa *v, void *addr) in vhost_vdpa_cvq_unmap_buf()
514 static int vhost_vdpa_cvq_map_buf(struct vhost_vdpa *v, void *buf, size_t size, in vhost_vdpa_cvq_map_buf()
545 struct vhost_vdpa *v; in vhost_vdpa_net_cvq_start()
553 v = &s->vhost_vdpa; in vhost_vdpa_net_cvq_start()
556 v->shadow_vqs_enabled = s0->vhost_vdpa.shadow_vqs_enabled; in vhost_vdpa_net_cvq_start()
557 s->vhost_vdpa.address_space_id = VHOST_VDPA_GUEST_PA_ASID; in vhost_vdpa_net_cvq_start()
590 s->vhost_vdpa.address_space_id = VHOST_VDPA_NET_CVQ_ASID; in vhost_vdpa_net_cvq_start()
593 if (!s->vhost_vdpa.shadow_vqs_enabled) { in vhost_vdpa_net_cvq_start()
615 r = vhost_vdpa_cvq_map_buf(&s->vhost_vdpa, s->cvq_cmd_out_buffer, in vhost_vdpa_net_cvq_start()
621 r = vhost_vdpa_cvq_map_buf(&s->vhost_vdpa, s->status, in vhost_vdpa_net_cvq_start()
624 vhost_vdpa_cvq_unmap_buf(&s->vhost_vdpa, s->cvq_cmd_out_buffer); in vhost_vdpa_net_cvq_start()
636 if (s->vhost_vdpa.shadow_vqs_enabled) { in vhost_vdpa_net_cvq_stop()
637 vhost_vdpa_cvq_unmap_buf(&s->vhost_vdpa, s->cvq_cmd_out_buffer); in vhost_vdpa_net_cvq_stop()
638 vhost_vdpa_cvq_unmap_buf(&s->vhost_vdpa, s->status); in vhost_vdpa_net_cvq_stop()
648 VhostShadowVirtqueue *svq = g_ptr_array_index(s->vhost_vdpa.shadow_vqs, 0); in vhost_vdpa_net_cvq_add()
670 VhostShadowVirtqueue *svq = g_ptr_array_index(s->vhost_vdpa.shadow_vqs, 0); in vhost_vdpa_net_svq_poll()
726 VhostShadowVirtqueue *svq = g_ptr_array_index(s->vhost_vdpa.shadow_vqs, 0); in vhost_vdpa_net_load_cmd()
1244 struct vhost_vdpa *v = &s->vhost_vdpa; in vhost_vdpa_net_cvq_load()
1712 s->vhost_vdpa.index = queue_pair_index; in net_vhost_vdpa_init()
1715 s->vhost_vdpa.shadow_vqs_enabled = svq; in net_vhost_vdpa_init()
1718 &s->vhost_vdpa.migration_blocker); in net_vhost_vdpa_init()
1719 s->vhost_vdpa.shared = g_new0(VhostVDPAShared, 1); in net_vhost_vdpa_init()
1720 s->vhost_vdpa.shared->device_fd = vdpa_device_fd; in net_vhost_vdpa_init()
1721 s->vhost_vdpa.shared->iova_range = iova_range; in net_vhost_vdpa_init()
1722 s->vhost_vdpa.shared->shadow_data = svq; in net_vhost_vdpa_init()
1731 s->vhost_vdpa.shadow_vq_ops = &vhost_vdpa_net_svq_ops; in net_vhost_vdpa_init()
1732 s->vhost_vdpa.shadow_vq_ops_opaque = s; in net_vhost_vdpa_init()
1736 s->vhost_vdpa.shared = shared; in net_vhost_vdpa_init()
1739 ret = vhost_vdpa_add(nc, (void *)&s->vhost_vdpa, queue_pair_index, nvqs); in net_vhost_vdpa_init()
1804 opts = &netdev->u.vhost_vdpa; in net_init_vhost_vdpa()
1860 shared = DO_UPCAST(VhostVDPAState, nc, ncs[0])->vhost_vdpa.shared; in net_init_vhost_vdpa()
1871 VhostVDPAShared *shared = s0->vhost_vdpa.shared; in net_init_vhost_vdpa()