summary refs log tree commit diff stats
path: root/hw/pci/pci.c
diff options
context:
space:
mode:
authorStefano Garzarella <sgarzare@redhat.com>2020-10-29 15:48:49 +0100
committerMichael S. Tsirkin <mst@redhat.com>2020-10-30 04:29:13 -0400
commit384c2561bddfa00cd3eaf9edbc1af6c7c120511f (patch)
tree6fcafd9ac0c4202e1d5877072f1f8b6bdf631465 /hw/pci/pci.c
parent9aa47edd4ee69fa0628c5f9adb52d5050a5bce6a (diff)
downloadfocaccia-qemu-384c2561bddfa00cd3eaf9edbc1af6c7c120511f.tar.gz
focaccia-qemu-384c2561bddfa00cd3eaf9edbc1af6c7c120511f.zip
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 'hw/pci/pci.c')
0 files changed, 0 insertions, 0 deletions