]> git.ipfire.org Git - thirdparty/qemu.git/commit
vdpa: move iova_tree allocation to net_vhost_vdpa_init
authorEugenio Pérez <eperezma@redhat.com>
Thu, 22 May 2025 14:58:38 +0000 (10:58 -0400)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 2 Jun 2025 18:29:15 +0000 (14:29 -0400)
commita400720365ea86602044b78dd8654911d0fe3977
treedf083b721542b9ef21769e89313381989b173d48
parent9344dcbd004f951155c020d01c1bdc881e0451c1
vdpa: move iova_tree allocation to net_vhost_vdpa_init

As we are moving to keep the mapping through all the vdpa device life
instead of resetting it at VirtIO reset, we need to move all its
dependencies to the initialization too.  In particular devices with
x-svq=on need a valid iova_tree from the beginning.

Simplify the code also consolidating the two creation points: the first
data vq in case of SVQ active and CVQ start in case only CVQ uses it.

Tested-by: Lei Yang <leiyang@redhat.com>
Reviewed-by: Si-Wei Liu <si-wei.liu@oracle.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Suggested-by: Si-Wei Liu <si-wei.liu@oracle.com>
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
Message-Id: <20250522145839.59974-7-jonah.palmer@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
include/hw/virtio/vhost-vdpa.h
net/vhost-vdpa.c