[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 45/99] tap: set vhostfd passed from qemu cli to non-
From: |
Michael Roth |
Subject: |
[Qemu-devel] [PATCH 45/99] tap: set vhostfd passed from qemu cli to non-blocking |
Date: |
Mon, 23 Jul 2018 15:16:54 -0500 |
From: Brijesh Singh <address@hidden>
A guest boot hangs while probing the network interface when
iommu_platform=on is used.
The following qemu cli hangs without this patch:
# $QEMU \
-netdev tap,fd=3,id=hostnet0,vhost=on,vhostfd=4 3<>/dev/tap67
4<>/dev/host-net \
-device
virtio-net-pci,netdev=hostnet0,id=net0,iommu_platform=on,disable-legacy=on \
...
Commit: c471ad0e9bd46 (vhost_net: device IOTLB support) took care of
setting vhostfd to non-blocking when QEMU opens /dev/host-net but if
the fd is passed from qemu cli then we need to ensure that fd is set
to non-blocking.
Fixes: c471ad0e9bd46 ("vhost_net: device IOTLB support")
Cc: address@hidden
Cc: Michael S. Tsirkin <address@hidden>
Cc: Jason Wang <address@hidden>
Signed-off-by: Brijesh Singh <address@hidden>
Signed-off-by: Jason Wang <address@hidden>
(cherry picked from commit d542800d1edc62f63f8a29cfa6bdd1a9536ae11c)
Signed-off-by: Michael Roth <address@hidden>
---
net/tap.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/tap.c b/net/tap.c
index 2b3a36f9b5..89c4e19162 100644
--- a/net/tap.c
+++ b/net/tap.c
@@ -40,6 +40,7 @@
#include "qemu-common.h"
#include "qemu/cutils.h"
#include "qemu/error-report.h"
+#include "qemu/sockets.h"
#include "net/tap.h"
@@ -693,6 +694,7 @@ static void net_init_tap_one(const NetdevTapOptions *tap,
NetClientState *peer,
}
return;
}
+ qemu_set_nonblock(vhostfd);
} else {
vhostfd = open("/dev/vhost-net", O_RDWR);
if (vhostfd < 0) {
--
2.17.1
- [Qemu-devel] [PATCH 35/99] Fix libusb-1.0.22 deprecated libusb_set_debug with libusb_set_option, (continued)
- [Qemu-devel] [PATCH 35/99] Fix libusb-1.0.22 deprecated libusb_set_debug with libusb_set_option, Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 38/99] block: Make bdrv_is_writable() public, Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 37/99] arm_gicv3_kvm: kvm_dist_get/put: skip the registers banked by GICR, Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 39/99] qcow2: Do not mark inactive images corrupt, Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 40/99] iotests: Add case for a corrupted inactive image, Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 03/99] ccid: Fix dwProtocols advertisement of T=0, Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 41/99] throttle: Fix crash on reopen, Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 42/99] i386: define the 'ssbd' CPUID feature bit (CVE-2018-3639), Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 43/99] i386: Define the Virt SSBD MSR and handling of it (CVE-2018-3639), Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 44/99] i386: define the AMD 'virt-ssbd' CPUID feature bit (CVE-2018-3639), Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 45/99] tap: set vhostfd passed from qemu cli to non-blocking,
Michael Roth <=
- [Qemu-devel] [PATCH 46/99] vhost-user: delete net client if necessary, Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 47/99] qemu-img: Fix assert when mapping unaligned raw file, Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 48/99] iotests: Add test 221 to catch qemu-img map regression, Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 50/99] usb: correctly handle Zero Length Packets, Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 49/99] arm_gicv3_kvm: kvm_dist_get/put_priority: skip the registers banked by GICR_IPRIORITYR, Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 04/99] nbd/client: Fix error messages during NBD_INFO_BLOCK_SIZE, Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 51/99] usb/dev-mtp: Fix use of uninitialized values, Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 54/99] cpus: tcg: fix never exiting loop on unplug, Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 52/99] vnc: fix use-after-free, Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 53/99] block/mirror: honor ratelimit again, Michael Roth, 2018/07/23