From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jkgcp-0004j4-3t for qemu-devel@nongnu.org; Sat, 12 Apr 2008 10:22:39 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jkgcn-0004hz-96 for qemu-devel@nongnu.org; Sat, 12 Apr 2008 10:22:38 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jkgcn-0004hp-60 for qemu-devel@nongnu.org; Sat, 12 Apr 2008 10:22:37 -0400 Received: from mail.windriver.com ([147.11.1.11] helo=mail.wrs.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Jkgcm-0000GP-Cn for qemu-devel@nongnu.org; Sat, 12 Apr 2008 10:22:37 -0400 Received: from ALA-MAIL03.corp.ad.wrs.com (ala-mail03 [147.11.57.144]) by mail.wrs.com (8.13.6/8.13.6) with ESMTP id m3CEMVKe009657 for ; Sat, 12 Apr 2008 07:22:33 -0700 (PDT) Message-ID: <4800C57A.3090101@windriver.com> Date: Sat, 12 Apr 2008 09:21:46 -0500 From: Jason Wessel MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 2/2] Fix slirp mac address init References: <1207801343-15955-1-git-send-email-jason.wessel@windriver.com> <1207801343-15955-2-git-send-email-jason.wessel@windriver.com> <1207801343-15955-3-git-send-email-jason.wessel@windriver.com> <20080412124448.GA29404@volta.aurel32.net> In-Reply-To: <20080412124448.GA29404@volta.aurel32.net> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org I figured most people do not have kgdboe as a built-in, and the qemu patch is definitely against an edge case. The problem is better described by the case where no packets have been transmitted by the qemu target and you desire to have the first communication occur externally. The edge case can happen if you do something like use kgdboe before the kernel is booted up. The OS will configure the ethernet interface to listen and wait for the debugger to attach, and in this case the MAC address is not set in the slirp because no packets have ever been transmitted yet. You would have do something like: qemu-redir udp:4445::6443 -append "console=ttyS0 kgdboe=@10.0.2.15/,@10.0.2.2/ kgdbwait" Then you would connect gdb with "target remote udp:localhost:4445". I will gladly provide you with a kernel that has kgdboe built in and some exact boot arguments if you would like to see the problem first hand. Jason. Aurelien Jarno wrote: > On Wed, Apr 09, 2008 at 11:22:23PM -0500, Jason Wessel wrote: > >> It is not possible to communicate to a qemu instance via a slirp >> redirected udp port until the OS running in qemu has executed a dhcp >> request. This is because the internal qemu dhcp server populates the >> > > Could you please more details? I am unable to reproduce the problem. A > simple netcat listening on a UDP port in the guest, and another netcat > in the host to send data works here. > > >> slirp mac address. Until the dhcp request is processed the translated >> mac address is zeroed out and the packets bound for the target OS will >> not correctly get the mac address of the qemu ethernet adapter. >> >> The solution is to initialize the slirp mac address when the qemu >> network adapter client is initialized. This allows the use >> bi-directional udp redirection with a static IP address configured on >> the qemu ethernet adapter. >>