* [Qemu-devel] [PATCH v2 for-2.12] tap: set vhostfd passed from qemu cli to non-blocking
@ 2018-04-06 18:51 Brijesh Singh
2018-04-08 3:53 ` Michael S. Tsirkin
0 siblings, 1 reply; 5+ messages in thread
From: Brijesh Singh @ 2018-04-06 18:51 UTC (permalink / raw)
To: qemu-devel
Cc: Thomas.Lendacky, Brijesh Singh, Michael S . Tsirkin, Jason Wang
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 <mst@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
---
Changes since v1:
- use qemu_set_nonblock() instead of fcntl(..)
net/tap.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/tap.c b/net/tap.c
index 2b3a36f9b50d..89c4e19162a2 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.14.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH v2 for-2.12] tap: set vhostfd passed from qemu cli to non-blocking
2018-04-06 18:51 [Qemu-devel] [PATCH v2 for-2.12] tap: set vhostfd passed from qemu cli to non-blocking Brijesh Singh
@ 2018-04-08 3:53 ` Michael S. Tsirkin
2018-05-17 14:54 ` Brijesh Singh
0 siblings, 1 reply; 5+ messages in thread
From: Michael S. Tsirkin @ 2018-04-08 3:53 UTC (permalink / raw)
To: Brijesh Singh; +Cc: qemu-devel, Thomas.Lendacky, Jason Wang
On Fri, Apr 06, 2018 at 01:51:25PM -0500, 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 <mst@redhat.com>
> Cc: Jason Wang <jasowang@redhat.com>
> Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
> ---
>
> Changes since v1:
> - use qemu_set_nonblock() instead of fcntl(..)
>
> net/tap.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/net/tap.c b/net/tap.c
> index 2b3a36f9b50d..89c4e19162a2 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.14.3
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH v2 for-2.12] tap: set vhostfd passed from qemu cli to non-blocking
2018-04-08 3:53 ` Michael S. Tsirkin
@ 2018-05-17 14:54 ` Brijesh Singh
2018-05-17 15:08 ` Michael S. Tsirkin
0 siblings, 1 reply; 5+ messages in thread
From: Brijesh Singh @ 2018-05-17 14:54 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: brijesh.singh, qemu-devel, Thomas.Lendacky, Jason Wang
Hi Michael and Jason,
Looks like this patch was not included in any of your pull request hence
it didn't made into 2.12. Can you please include this patch in your next
pull request?
~ Brijesh
On 04/07/2018 10:53 PM, Michael S. Tsirkin wrote:
> On Fri, Apr 06, 2018 at 01:51:25PM -0500, 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 <mst@redhat.com>
>> Cc: Jason Wang <jasowang@redhat.com>
>> Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
>
> Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
>
>> ---
>>
>> Changes since v1:
>> - use qemu_set_nonblock() instead of fcntl(..)
>>
>> net/tap.c | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/net/tap.c b/net/tap.c
>> index 2b3a36f9b50d..89c4e19162a2 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.14.3
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH v2 for-2.12] tap: set vhostfd passed from qemu cli to non-blocking
2018-05-17 14:54 ` Brijesh Singh
@ 2018-05-17 15:08 ` Michael S. Tsirkin
2018-05-21 3:01 ` Jason Wang
0 siblings, 1 reply; 5+ messages in thread
From: Michael S. Tsirkin @ 2018-05-17 15:08 UTC (permalink / raw)
To: Brijesh Singh; +Cc: qemu-devel, Thomas.Lendacky, Jason Wang
On Thu, May 17, 2018 at 09:54:40AM -0500, Brijesh Singh wrote:
> Hi Michael and Jason,
>
> Looks like this patch was not included in any of your pull request hence it
> didn't made into 2.12. Can you please include this patch in your next pull
> request?
>
> ~ Brijesh
I reviewed.
Jason?
Cc stable I guess ...
> On 04/07/2018 10:53 PM, Michael S. Tsirkin wrote:
> > On Fri, Apr 06, 2018 at 01:51:25PM -0500, 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 <mst@redhat.com>
> > > Cc: Jason Wang <jasowang@redhat.com>
> > > Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
> >
> > Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
> >
> > > ---
> > >
> > > Changes since v1:
> > > - use qemu_set_nonblock() instead of fcntl(..)
> > >
> > > net/tap.c | 2 ++
> > > 1 file changed, 2 insertions(+)
> > >
> > > diff --git a/net/tap.c b/net/tap.c
> > > index 2b3a36f9b50d..89c4e19162a2 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.14.3
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH v2 for-2.12] tap: set vhostfd passed from qemu cli to non-blocking
2018-05-17 15:08 ` Michael S. Tsirkin
@ 2018-05-21 3:01 ` Jason Wang
0 siblings, 0 replies; 5+ messages in thread
From: Jason Wang @ 2018-05-21 3:01 UTC (permalink / raw)
To: Michael S. Tsirkin, Brijesh Singh; +Cc: Thomas.Lendacky, qemu-devel
On 2018年05月17日 23:08, Michael S. Tsirkin wrote:
> On Thu, May 17, 2018 at 09:54:40AM -0500, Brijesh Singh wrote:
>> Hi Michael and Jason,
>>
>> Looks like this patch was not included in any of your pull request hence it
>> didn't made into 2.12. Can you please include this patch in your next pull
>> request?
>>
>> ~ Brijesh
>
> I reviewed.
> Jason?
> Cc stable I guess ...
Yes. Applied.
Thanks
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-05-21 3:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-06 18:51 [Qemu-devel] [PATCH v2 for-2.12] tap: set vhostfd passed from qemu cli to non-blocking Brijesh Singh
2018-04-08 3:53 ` Michael S. Tsirkin
2018-05-17 14:54 ` Brijesh Singh
2018-05-17 15:08 ` Michael S. Tsirkin
2018-05-21 3:01 ` Jason Wang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.