diff options
author | Stefano Garzarella <sgarzare@redhat.com> | 2020-10-29 15:48:49 +0100 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2020-10-30 04:29:13 -0400 |
commit | 384c2561bddfa00cd3eaf9edbc1af6c7c120511f (patch) | |
tree | 6fcafd9ac0c4202e1d5877072f1f8b6bdf631465 /storage-daemon/qapi/meson.build | |
parent | 9aa47edd4ee69fa0628c5f9adb52d5050a5bce6a (diff) |
vhost-vsock: set vhostfd to non-blocking mode
vhost IOTLB API uses read()/write() to exchange iotlb messages with
the kernel module.
The QEMU implementation expects a non-blocking fd, indeed commit
c471ad0e9b ("vhost_net: device IOTLB support") set it for vhost-net.
Without this patch, if we enable iommu for the vhost-vsock device,
QEMU can hang when exchanging IOTLB messages.
As commit 894022e616 ("net: check if the file descriptor is valid
before using it") did for tap, let's use qemu_try_set_nonblock()
when fd is provided by the user.
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Message-Id: <20201029144849.70958-1-sgarzare@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'storage-daemon/qapi/meson.build')
0 files changed, 0 insertions, 0 deletions