]> git.proxmox.com Git - mirror_qemu.git/commit
vdpa: move CVQ isolation check to net_init_vhost_vdpa
authorEugenio Pérez <eperezma@redhat.com>
Fri, 26 May 2023 15:31:43 +0000 (17:31 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Fri, 23 Jun 2023 07:09:45 +0000 (03:09 -0400)
commit152128d646973ed298d41dafd7a5bccff43336c8
treed4c5247c3b2b5bf7bb8fcfd77e764c8253ef37fd
parent0f2bb0bf38b04e9dfdc32ce5c762dd317f5a4c5a
vdpa: move CVQ isolation check to net_init_vhost_vdpa

Evaluating it at start time instead of initialization time may make the
guest capable of dynamically adding or removing migration blockers.

Also, moving to initialization reduces the number of ioctls in the
migration, reducing failure possibilities.

As a drawback we need to check for CVQ isolation twice: one time with no
MQ negotiated and another one acking it, as long as the device supports
it.  This is because Vring ASID / group management is based on vq
indexes, but we don't know the index of CVQ before negotiating MQ.

Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Message-Id: <20230526153143.470745-3-eperezma@redhat.com>
Tested-by: Lei Yang <leiyang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
net/vhost-vdpa.c