qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wessel <jason.wessel@windriver.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/2] Fix slirp mac address init
Date: Sat, 12 Apr 2008 09:21:46 -0500	[thread overview]
Message-ID: <4800C57A.3090101@windriver.com> (raw)
In-Reply-To: <20080412124448.GA29404@volta.aurel32.net>


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.
>>     

      reply	other threads:[~2008-04-12 14:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-10  4:22 [Qemu-devel] [PATCH 0/2] slirp udp fixes Jason Wessel
2008-04-10  4:22 ` [Qemu-devel] [PATCH 1/2] Fix slirp udp source address contamination Jason Wessel
2008-04-10  4:22   ` [Qemu-devel] [PATCH 2/2] Fix slirp mac address init Jason Wessel
2008-04-12 12:44     ` Aurelien Jarno
2008-04-12 14:21       ` Jason Wessel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4800C57A.3090101@windriver.com \
    --to=jason.wessel@windriver.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).