[Top][All Lists]

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

Re: [Qemu-devel] broken socket events on win32 qemu

From: Paolo Bonzini
Subject: Re: [Qemu-devel] broken socket events on win32 qemu
Date: Mon, 7 Mar 2016 13:45:36 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

On 07/03/2016 11:19, Daniel P. Berrange wrote:
> On Mon, Mar 07, 2016 at 07:23:12AM +0000, Andrew Baumann wrote:
>> Hi Daniel,
>> This commit ("char: convert from GIOChannel to QIOChannel"):
>> https://github.com/qemu/qemu/commit/9894dc0cdcc397ee5b26370bc53da6d360a363c2
>> ... appears to have broken socket events for character devices on Win32.
>> For example, I can no longer connect to a GDB stub (started with:
>> "-gdb tcp:"), since tcp_chr_accept is never called.
>> Without having looked very closely at the code, I suspect the problem may
>> be that we've lost the special-case treatment of socket handles as distinct
>> from file descriptors on Win32 (they are different namespaces, and different
>> APIs are needed). The previous version of qemu-char.c special-cased sockets
>> in io_channel_from_socket():
>> -#ifdef _WIN32
>> -    chan = g_io_channel_win32_new_socket(fd);
>> -#else
>> -    chan = g_io_channel_unix_new(fd);
>> -#endif
>> ... but I don't see anything equivalent in io/channel-socket.c. Am I looking
>> in the wrong place?
> No, you are correct, this is broken for the reason you describe. Seems
> this is the one key feature I forgot to add unit test coverage for :-(
>> BTW, The same change introduces another problem on win32: server sockets
>> like the GDB example above fail on getpeername() with "Unable to query
>>  remote socket address: Unknown error". This seems to be caused by a
>> definition of ENOTCONN that is not WSAENOTCONN. I'm still trying to
>> figure out why that is, and how to best fix it.
> Can you say how you are building QEMU ? Are you using mingw to do a cross
> compile for Win32, or something else ?

FWIW, Wine works fine for me.  I just copy /mingw from Fedora's sysroot
into Wine's C:\mingw.


reply via email to

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