network in bridge mode doesn't work in SMP Linux guest

Bug #1013467 reported by Yongjie Ren
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
QEMU
Fix Released
Undecided
Unassigned

Bug Description

Environment:
------------
Host OS (ia32/ia32e/IA64):ia32e
Guest OS (ia32/ia32e/IA64):ia32e
Guest OS Type (Linux/Windows):Linux
kvm.git Commit:25e531a988ea5a64bd97a72dc9d3c65ad5850120
qemu-kvm Commit:0a948cbb1835e5f36990e173966d30bc4c8cc038
Host Kernel Version:3.5.0-rc1
Hardware:WSM-EP, Romley-EP

Bug detailed description:
--------------------------
Network in bridge mode doesn't work in SMP RHEL6.1/6.2 guest.
After booting up, use “dhclient ethX” to get IP (we use DHCP in the network), guest can not get IP.
Note: 1. UP guest(-smp 1) doesn’t have this issue.
             2. Windows(e.g. Win7) guest(-smp 4) has no issue.

This should be a qemu-kvm bug.
kvm + qemu-kvm = result
25e531a9 + 0a948cbb = bad
25e531a9 + 18b01275 = good

Reproduce steps:
----------------
1.start up a host with kvm(25e531a9) + qemu-kvm (0a948cbb)
2.qemu-system-x86_64 -m 1024 -smp 4 –net nic,model=rt18139 –net tap,script=/etc/kvm/qemu-ifup –hda /root/rhel6u1.qcow
3. ifconfig
4. ping 192.168.199.98 (a IP in the same subnet)
5. dhclient ethx (can't get dynamic IP address)

Current result:
----------------
The guest can not get IP

Expected result:
----------------
The guest get IP and work fine.

Revision history for this message
Yongjie Ren (yongjie-ren) wrote :
Revision history for this message
Yongjie Ren (yongjie-ren) wrote :
Revision history for this message
Xuekun Hu (xuekun-hu-intel) wrote :

The regression is due to the patch of "rtl8139: do the network/host communication only in normal operating mode". (Commit
ff71f2e8cacefae99179993204172bc65e4303df).

However after applying the patch, someone already reported this issue. (http://comments.gmane.org/gmane.comp.emulators.qemu/150064). So revertted this patch.

Not sure why this patch revert-revert again? So the bug happened again.

Revision history for this message
Yongjie Ren (yongjie-ren) wrote :

Verified this bug against latest qemu-kvm upstream.
kvm + qemu-kvm: ae7a2a3f + a212f79f..

The following commit fixed it.
commit a212f79fc4596570124fb864425b980c157cd001
Author: Jason Wang <email address hidden>
Date: Thu May 17 13:25:43 2012 +0800

    rtl8139: validate rx ring before receiving packets

    Commit ff71f2e8cacefae99179993204172bc65e4303df prevent the possible
    crash during initialization of linux driver by checking the operating
    mode.This seems too strict as:

    - the real card could still work in mode other than normal
    - some buggy driver who does not set correct opmode after eeprom
     access

    So, considering rx ring address were reset to zero (which could be
    safely trated as an address not intened to DMA to), in order to
    both letting old guest work and preventing the unexpected DMA to
    guest, we can forbid packet receiving when rx ring address is zero.

Changed in qemu:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.