qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH for-2.12] tap: set vhostfd passed from qemu cli


From: Brijesh Singh
Subject: Re: [Qemu-devel] [PATCH for-2.12] tap: set vhostfd passed from qemu cli to non-blocking
Date: Fri, 6 Apr 2018 11:08:38 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0



On 04/06/2018 10:44 AM, Eric Blake wrote:
On 04/06/2018 07:03 AM, Brijesh Singh wrote:
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: Michael S. Tsirkin <address@hidden>
Cc: Jason Wang <address@hidden>
Signed-off-by: Brijesh Singh <address@hidden>
---
  net/tap.c | 1 +
  1 file changed, 1 insertion(+)

diff --git a/net/tap.c b/net/tap.c
index 2b3a36f9b50d..8c026fbf95cd 100644
--- a/net/tap.c
+++ b/net/tap.c
@@ -693,6 +693,7 @@ static void net_init_tap_one(const NetdevTapOptions *tap, 
NetClientState *peer,
                  }
                  return;
              }
+            fcntl(vhostfd, F_SETFL, O_NONBLOCK);

Please use qemu_set_nonblock() instead.



Sure will do.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]