On Mon, Aug 05, 2019 at 11:32:31AM +0800, Ning Bo wrote:
> If a program in host communicates with a vsock device in guest via
> 'vsock://', but the device is not ready, the 'connect' syscall will
> block and then timeout after 2 second default.(the timeout is defined
> in kernel: #define VSOCK_DEFAULT_CONNECT_TIMEOUT (2 * HZ)).
> We can avoid this case if qemu reports an event when the vsock is
> ready and the program waits the event before connecting.
> 
> Report vsock running event so that the upper application can
> control boot sequence.
> see https://github.com/kata-containers/runtime/pull/1918

Please describe the issue with connect(2) in detail.  Are you observing
that connect(2) always times out when called before the guest driver
hasn't set the virtio-vsock status register to
VIRTIO_CONFIG_S_DRIVER_OK?

I think that adding a QMP event is working around the issue rather than
fixing the root cause.  This is probably a vhost_vsock.ko problem and
should be fixed there.

Stefan

Attachment: signature.asc
Description: PGP signature

Reply via email to