vhost: restore IOTLB mempool allocation
authorDavid Marchand <david.marchand@redhat.com>
Mon, 17 May 2021 08:59:51 +0000 (10:59 +0200)
committerChenbo Xia <chenbo.xia@intel.com>
Tue, 18 May 2021 07:54:44 +0000 (09:54 +0200)
commitf31ce483bcdced91685b5d3c7291d79793f7499c
tree65098fd77ed4d31cc0dcf3d1a1c273789987db4e
parent3ad55b8e94caa33c55895600865fe7edf7cc8d53
vhost: restore IOTLB mempool allocation

IOTLB messages will be sent when some queues are not enabled. If we
initialize IOTLB in vhost_user_set_vring_num, it could happen that IOTLB
update comes when IOTLB pool of disabled queues are not initialized.

Fixes: 968bbc7e2e50 ("vhost: avoid IOTLB mempool allocation while IOMMU disabled")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
lib/vhost/vhost.c
lib/vhost/vhost_user.c