Received: from eggs.gnu.org ([140.186.70.92]:41139) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QM6Fu-0002i9-9d for qemu-devel@nongnu.org; Mon, 16 May 2011 18:27:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QM6Fs-000586-Oh for qemu-devel@nongnu.org; Mon, 16 May 2011 18:27:14 -0400 Received: from mail-gx0-f173.google.com ([209.85.161.173]:55171) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QM6Fs-00057y-Ht for qemu-devel@nongnu.org; Mon, 16 May 2011 18:27:12 -0400 Received: by gxk26 with SMTP id 26so2019165gxk.4 for ; Mon, 16 May 2011 15:27:11 -0700 (PDT) From: "Adnan Khaleel" Message-ID: <20110516222706.dd693872@shadowfax.no-ip.com> Date: Mon, 16 May 2011 17:27:06 -0500 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="-----------68e703697211f7e518ab0e4a567749c2" Subject: [Qemu-devel] Debug Qemu dhcpd Reply-To: adnan@khaleel.us List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Isaku Yamahata This is a multi-part message in MIME format. -------------68e703697211f7e518ab0e4a567749c2 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I'm using Isaku Yamahata's q35 chipset model in Qemu0.14 and I'm trying = to figure out why the Qemu dhcpd server is not responding back to the ni= c device in the guest OS when used with user mode networking. The guest OS sees the network device and initialises it but I think the = Qemu DHCP server/firewall never gets back, since the network device does= n't even get a 10.0.2.15 ip address during bootup and the guest dhcp cli= ent never gets an ip address,=20 eth0 device: Intel Corporation 82540EM Gigabit Ethernet Controller (re= v 03) eth0 Starting DHCP4 client. . . . . . . . eth0 DHCP4 continues in background=20 eth0 device: Intel Corporation 82540EM Gigabit Ethernet Controller (re= v 03) eth0 DHCP4 client (dhcpcd) is running eth0 . . . but is still waiting for data eth0 interface could not be set up until now So doing an ifconfig later on just shows eth0 Link encap:Ethernet HWaddr 52:54:00:12:34:56 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) lo Link encap:Local loopback =20 inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNING MTU:16436 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) The NIC device is an Intel e1000 however, even if I use a pci ne2k, I ge= t the same result. I've enabled debugging in the hw/e1000.c and in compa= ring the good debug output with the bad debug output, I noticed the poin= t of deviation. The two traces are identical up till that point. Given t= hat the problem is not the e1000 model itself, I doubt these traces are = anything but symptomatic of the underlying problem in the Qemu portion t= hat handles network traffic.=20 Any ideas on what I can check next to see where the underlying problem m= ight be=3F -AK This is a trace of the e1000.c debug messages from boot up for the good = case on the left (where networking works) and the bad case on the right = (where it doesn't). Good - Debug out = Bad - Debug out =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D e1000: e1000=5Fioport=5Fmap addr=3D0xc040 size=3D0x00000040 = =20 e1000: e1000=5Fioport=5Fmap addr=3D0xc040 size=3D0x00000040 =20 e1000: RCTL: 0, mac=5Freg[RCTL] =3D 0x0 =20 e1000: tx disabled =20 e1000: RCTL: 0, mac=5Freg[RCTL] =3D 0x0 = =20 e1000: tx disabled =20 e1000: MMIO unknown write addr=3D0x00005800,val=3D0x00000000 =20 e1000: tx disabled =20 e1000: MMIO unknown write addr=3D0x00000030,val=3D0x00008808 =20 e1000: MMIO unknown write addr=3D0x0000002c,val=3D0x00000100 =20 e1000: MMIO unknown write addr=3D0x00000028,val=3D0x00c28001 =20 e1000: MMIO unknown write addr=3D0x00000170,val=3D0x00000680 =20 e1000: MMIO unknown write addr=3D0x00002160,val=3D0x00000000 =20 e1000: MMIO unknown write addr=3D0x00002168,val=3D0x00000000 =20 e1000: MMIO unknown read addr=3D0x00004014 =20 e1000: MMIO unknown read addr=3D0x00004018 =20 e1000: MMIO unknown read addr=3D0x0000401c =20 e1000: MMIO unknown read addr=3D0x00004020 =20 : = =20 e1000: MMIO unknown read addr=3D0x000040b4 =20 e1000: MMIO unknown read addr=3D0x000040b8 =20 e1000: MMIO unknown read addr=3D0x000040bc =20 e1000: MMIO unknown write addr=3D0x00000458,val=3D0x00000000 =20 e1000: RCTL: 0, mac=5Freg[RCTL] =3D 0x40000 =20 e1000: tx disabled =20 e1000: MMIO unknown write addr=3D0x00000410,val=3D0x00602008 =20 e1000: MMIO unknown write addr=3D0x00003820,val=3D0x00000008 =20 e1000: MMIO unknown write addr=3D0x0000382c,val=3D0x00000020 =20 e1000: tx disabled =20 e1000: tx disabled =20 e1000: RCTL: 0, mac=5Freg[RCTL] =3D 0x48002 =20 e1000: RCTL: 0, mac=5Freg[RCTL] =3D 0x48000 =20 e1000: MMIO unknown write addr=3D0x00002820,val=3D0x00000000 =20 e1000: MMIO unknown write addr=3D0x0000282c,val=3D0x00000008 =20 e1000: MMIO unknown write addr=3D0x000000c4,val=3D0x000000c3 =20 e1000: MMIO unknown read addr=3D0x00005000 =20 e1000: MMIO unknown write addr=3D0x00005000,val=3D0x00000200 = =20 e1000: RCTL: 0, mac=5Freg[RCTL] =3D 0x48002 e1000: RCTL: 0, mac=5Fre= g[RCTL] =3D 0x48002 =20 e1000: MMIO unknown write addr=3D0x000000c4,val=3D0x000003d0 e1000: RCT= L: 254, mac=5Freg[RCTL] =3D 0x48002 <=3D Point at which 1st difference a= ppears e1000: RCTL: 254, mac=5Freg[RCTL] =3D 0x48002 e1000: RCTL: 254, mac= =5Freg[RCTL] =3D 0x48002 e1000: tx disabled e1000: RCTL: 254, mac=5Freg[RCTL] =3D 0x48002 e1000: MMIO unknown read addr=3D0x00004088 e1000: RCTL: 254, mac=5Fre= g[RCTL] =3D 0x48002 e1000: MMIO unknown read addr=3D0x0000408c e1000: RCTL: 254, mac=5Fre= g[RCTL] =3D 0x48002 e1000: MMIO unknown read addr=3D0x00004078 e1000: RCTL: 254, mac=5Fre= g[RCTL] =3D 0x48002 e1000: MMIO unknown read addr=3D0x0000407c e1000: RCTL: 254, mac=5Fre= g[RCTL] =3D 0x48002 e1000: MMIO unknown read addr=3D0x000040ac e1000: RCTL: 254, mac=5Fre= g[RCTL] =3D 0x0 e1000: MMIO unknown read addr=3D0x0000405c e1000: tx disabled e1000: MMIO unknown read addr=3D0x00004060 e1000: MMIO unknown write = addr=3D0x00005800,val=3D0x00000000 e1000: MMIO unknown read addr=3D0x00004064 e1000: tx disabled e1000: MMIO unknown read addr=3D0x00004068 e1000: MMIO unknown write = addr=3D0x00000030,val=3D0x00008808 = e1000: MMIO unknown write addr=3D0x0000002c,val=3D0x00000100 = e1000: MMIO unknown write addr=3D0x00000028,val=3D0x00c28001 = e1000: MMIO unknown write addr=3D0x00000170,val=3D0x00000680 = e1000: MMIO unknown write addr=3D0x00002160,val=3D0x00000000 = =20 = =20 -------------68e703697211f7e518ab0e4a567749c2 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

I'm using Isaku Yamahata's q35 chipset model in Qemu= 0.14 and I'm trying to figure out why the Qemu dhcpd server is not respo= nding back to the nic device in the guest OS when used with user mode ne= tworking.
The guest OS sees the network device and initialises= it but I think the Qemu DHCP server/firewall never gets back, since the= network device doesn't even get a 10.0.2.15 ip address during bootup an= d the guest dhcp client never gets an ip address, 
<= div>
eth= 0   device: Intel Corporation 82540EM Gigabit Ethernet Controller (= rev 03)
eth0   Starting DHCP4 client. . . . . . . .
eth0   DHCP4 continu= es in background 
eth0   device: Intel Corporation 82540EM Gigabit = Ethernet Controller (rev 03)
eth0   DHCP4 client (dhcpcd) is running
eth0 &nb= sp; . . . but is still waiting for data
eth0   interface could not be se= t up until now

So doing an ifconfig late= r on just shows

eth0     Link encap:Ethernet  HW= addr 52:54:00:12:34:56
         UP BROADCAST MULTICA= ST  MTU:1500  Metric:1
         RX packets= :0 errors:0 dropped:0 overruns:0 frame:0
         TX= packets:0 errors:0 dropped:0 overruns:0 carrier:0
      =   collisions:0 txqueuelen:1000
         RX byt= es:0 (0.0 b)   TX bytes:0 (0.0 b)

lo       Link enca= p:Local loopback  
         inet addr:127.0.0.1=  Mask:255.0.0.0
         inet6 addr: ::1/128 S= cope:Host
         UP LOOPBACK RUNING  MTU:1643= 6  Metric:1
         RX packets:0 errors:0 dro= pped:0 overruns:0 frame:0
         TX packets:0 erro= rs:0 dropped:0 overruns:0 carrier:0
         collisi= ons:0 txqueuelen:1000
         RX bytes:0 (0.0 b) &n= bsp; TX bytes:0 (0.0 b)

The NIC device is an Intel e1000 however, e= ven if I use a pci ne2k, I get the same result. I've enabled debugging i= n the hw/e1000.c and in comparing the good debug output with the bad deb= ug output, I noticed the point of deviation. The two traces are identica= l up till that point. Given that the problem is not the e1000 model = itself, I doubt these traces are anything but symptomatic of the underly= ing problem in the Qemu portion that handles network traffic. 

Any ideas on what I can check next to see where the u= nderlying problem might be=3F

-AK

= This is a trace of the e= 1000.c debug messages from boot up for the good case on the left (where = networking works) and the bad case on the right (where it doesn't).

=
Good -= Debug out                  = ;                     =                    Bad= - Debug out
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D   &nb= sp;                    = ;                     =              =3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D
e1000: e1000=5Fioport=5Fmap addr=3D0xc040 size=3D0x0000= 0040                   &nbs= p;      
e1000: e1000=5Fioport=5Fmap addr=3D0xc040 size=3D0x00= 000040=09=09=09= =09=09=09=09 
e1000: RCTL: 0, mac=5Freg[RCTL] =3D 0x0=09=09=09=09=09=09=09=09= =09=09=09 
e1000: tx disabled=09=09=09=09=09=09=09=09=09=09=09=09=09=09=09 
e1000: RCTL: 0, mac=5Freg[RCTL] =3D 0x0         &= nbsp;                   &nb= sp;            
e1000: tx disabled=09=09=09=09=09=09=09=09= =09=09=09=09=09=09=09 
e1000: MMIO unknown write addr=3D0x0000580= 0,val=3D0x00000000=09=09=09=09=09 
e1000: tx disabled=09=09=09=09=09=09=09=09=09=09=09=09=09=09= =09 
e1000: MMIO unknown write addr=3D0x00000030,val=3D0x0000880= 8=09=09=09=09= =09 
e1000: MMIO unknown write addr=3D0x0000002c,val=3D0x0000010= 0=09=09=09=09= =09 
e1000: MMIO unknown write addr=3D0x00000028,val=3D0x00c2800= 1=09=09=09=09= =09 
e1000: MMIO unknown write addr=3D0x00000170,val=3D0x0000068= 0=09=09=09=09= =09 
e1000: MMIO unknown write addr=3D0x00002160,val=3D0x0000000= 0=09=09=09=09= =09 
e1000: MMIO unknown write addr=3D0x00002168,val=3D0x0000000= 0=09=09=09=09= =09 
e1000: MMIO unknown read addr=3D0x00004014=09=09=09=09=09=09=09=09=09 
e1000: MMIO unknown read addr=3D0x00004018=09=09=09=09=09=09=09=09=09 <= /font>
e1000= : MMIO unknown read addr=3D0x0000401c=09=09=09=09=09=09=09=09=09 
e1000: MMIO un= known read addr=3D0x00004020=09=09=09=09=09=09=09=09=09 
<= font class=3D"Apple-style-span" face=3D"Courier">:       =                     &n= bsp;                   &nbs= p;                    =        
e1000: MMIO unknown read addr=3D0x000040b4=09=09=09=09=09=09=09= =09=09 
e1000: MMIO unknown read addr=3D0x000040b8=09=09=09=09=09=09=09=09=09 
e1000: MMIO unknown read addr=3D0x000040bc=09=09=09=09=09=09=09=09=09 = ;
e10= 00: MMIO unknown write addr=3D0x00000458,val=3D0x00000000=09=09=09=09=09 
e1000:= RCTL: 0, mac=5Freg[RCTL] =3D 0x40000=09=09=09=09=09=09=09=09=09=09 =
e1000: tx d= isabled=09=09= =09=09=09=09=09=09=09=09=09=09=09=09=09 
e1000: MMIO unknown writ= e addr=3D0x00000410,val=3D0x00602008=09=09=09=09=09 
e1000: MMIO unknown write a= ddr=3D0x00003820,val=3D0x00000008=09=09=09=09=09 
e1000: MMIO unknown write addr= =3D0x0000382c,val=3D0x00000020=09=09=09=09=09 
e1000: tx disabled=09=09=09=09=09=09=09=09=09=09= =09=09=09=09=09 
e1000: tx disabled=09=09=09=09=09=09=09=09=09=09=09=09=09=09=09=  
e1000: RCTL: 0, mac=5Freg[RCTL] =3D 0x48002=09=09=09=09=09=09=09=09=09=09 
e1000: RCTL: 0, mac=5Freg[RCTL] =3D 0x48000=09=09=09=09=09=09=09=09=09=09&nb= sp;
e= 1000: MMIO unknown write addr=3D0x00002820,val=3D0x00000000=09=09=09=09=09&nbs= p;
e1= 000: MMIO unknown write addr=3D0x0000282c,val=3D0x00000008=09=09=09=09=09 <= /font>
e1000= : MMIO unknown write addr=3D0x000000c4,val=3D0x000000c3=09=09=09=09=09 
e1000: M= MIO unknown read addr=3D0x00005000=09=09=09=09=09=09=09=09=09 
e1000: MMIO unk= nown write addr=3D0x00005000,val=3D0x00000200=09=09=09=09=09     =    
e1000: RCTL: 0, mac=5Freg[RCTL] =3D 0x48002=09=09=09=09=09e1000: RCTL: = 0, mac=5Freg[RCTL] =3D 0x48002            =                  
e1000:= MMIO unknown write addr=3D0x000000c4,val=3D0x000003d0=09=09e1000: RCTL: 254, ma= c=5Freg[RCTL] =3D 0x48002 <=3D Point at which 1st difference app= ears
e1000: RCTL: 254, mac=5Freg[RCTL] =3D 0x48002=09=09=09=09e1000: RCTL: 254= , mac=5Freg[RCTL] =3D 0x48002
e1000: tx disabled=09=09=09=09=09=09=09e1000: RCTL: 254= , mac=5Freg[RCTL] =3D 0x48002
e1000: MMIO unknown read addr=3D0x00004088=09=09=09=09e= 1000: RCTL: 254, mac=5Freg[RCTL] =3D 0x48002
e1000: MMIO unknown read addr=3D= 0x0000408c=09= =09=09=09e1000: RCTL: 254, mac=5Freg[RCTL] =3D 0x48002
e1000: MMIO unk= nown read addr=3D0x00004078=09=09=09=09e1000: RCTL: 254, mac=5Freg[RCTL] =3D 0x4= 8002
= e1000: MMIO unknown read addr=3D0x0000407c=09=09=09=09e1000: RCTL: 254, mac=5Fre= g[RCTL] =3D 0x48002
e1000: MMIO unknown read addr=3D0x000040ac=09=09=09=09e1000: RCTL= : 254, mac=5Freg[RCTL] =3D 0x0
e1000: MMIO unknown read addr=3D0x0000405c=09=09=09=09= e1000: tx disabled
e1000: MMIO unknown read addr=3D0x00004060=09=09=09=09e1000: MMIO = unknown write addr=3D0x00005800,val=3D0x00000000
e1000: MMIO unknown read add= r=3D0x00004064= =09=09=09=09e1000: tx disabled
e1000: MMIO unknown read addr=3D0x00004= 068=09=09=09=09= e1000: MMIO unknown write addr=3D0x00000030,val=3D0x00008808
 &nb= sp;                    = ;                     =                     &n= bsp;        e1000: MMIO unknown write addr=3D0x00000= 02c,val=3D0x00000100
               &= nbsp;                   &nb= sp;                    = ;                e1000: MMIO unk= nown write addr=3D0x00000028,val=3D0x00c28001
       &nbs= p;                    =                     &= nbsp;                   &nb= sp;  e1000: MMIO unknown write addr=3D0x00000170,val=3D0x00000680
 =                     &n= bsp;                   &nbs= p;                    =          e1000: MMIO unknown write addr=3D0x00= 002160,val=3D0x00000000
=                    &nb= sp;                    = ;                     =                

                 &nbs= p;                    =                     &= nbsp;                




=