On Sun, Jun 21, 2015 at 11:26:08AM -0000, Jonathan Liu wrote:
> Using the instructions at
> http://www.contrib.andrew.cmu.edu/~somlo/OSXKVM/ for running Mac OS X
> Snow Leopard under QEMU, bridged networking is broken when using QEMU
> git. The result is that Mac OS X is unable to obtain an IP address using
> DHCP. It works in the latest stable release - QEMU 2.3.0.
>
> Replace "-netdev user,id=hub0port0" with "-netdev
> bridge,br=br0,id=hub0port0" when testing bridged networking.
>
> Bisecting the git repository shows the following bad commit:
> commit a90a7425cf592a3afeff3eaf32f543b83050ee5c
> Author: Fam Zheng <email address hidden>
> Date: Thu Jun 4 14:45:17 2015 +0800
>
> tap: Drop tap_can_send
Please confirm that you are using -device e1000-82545em.
Please try the following patch to gather debug output:
On Sun, Jun 21, 2015 at 11:26:08AM -0000, Jonathan Liu wrote: www.contrib. andrew. cmu.edu/ ~somlo/ OSXKVM/ for running Mac OS X br=br0, id=hub0port0" when testing bridged networking. afeff3eaf32f543 b83050ee5c
> Using the instructions at
> http://
> Snow Leopard under QEMU, bridged networking is broken when using QEMU
> git. The result is that Mac OS X is unable to obtain an IP address using
> DHCP. It works in the latest stable release - QEMU 2.3.0.
>
> Replace "-netdev user,id=hub0port0" with "-netdev
> bridge,
>
> Bisecting the git repository shows the following bad commit:
> commit a90a7425cf592a3
> Author: Fam Zheng <email address hidden>
> Date: Thu Jun 4 14:45:17 2015 +0800
>
> tap: Drop tap_can_send
Please confirm that you are using -device e1000-82545em.
Please try the following patch to gather debug output:
diff --git a/hw/net/e1000.c b/hw/net/e1000.c link_down( E1000State *s) >mac_reg[ STATUS] &= ~E1000_STATUS_LU; >phy_reg[ PHY_STATUS] &= ~MII_SR_ LINK_STATUS; >phy_reg[ PHY_STATUS] &= ~MII_SR_ AUTONEG_ COMPLETE; down(E1000State *s) link_up( E1000State *s) >mac_reg[ STATUS] |= E1000_STATUS_LU; >phy_reg[ PHY_STATUS] |= MII_SR_LINK_STATUS; receive( NetClientState *nc) nic_opaque( nc);
index bab8e2a..2f68c6d 100644
--- a/hw/net/e1000.c
+++ b/hw/net/e1000.c
@@ -174,6 +174,7 @@ enum {
static void
e1000_
{
+ fprintf(stderr, "%s link down\n", __func__);
s-
s-
s-
@@ -183,6 +184,7 @@ e1000_link_
static void
e1000_
{
+ fprintf(stderr, "%s link up\n", __func__);
s-
s-
}
@@ -923,6 +925,12 @@ e1000_can_
{
E1000State *s = qemu_get_
+ fprintf(stderr, "%s lu %d rctl_en %d pci_master %d has_rxbufs %d\n", obj.config[ PCI_COMMAND] & PCI_COMMAND_MASTER,
(s->mac_ reg[RCTL] & E1000_RCTL_EN) &&
(s->parent_ obj.config[ PCI_COMMAND] & PCI_COMMAND_MASTER) &&
+ __func__, s->mac_reg[STATUS] & E1000_STATUS_LU,
+ s->mac_reg[RCTL] & E1000_RCTL_EN,
+ s->parent_
+ e1000_has_rxbufs(s, 1));
+
return (s->mac_reg[STATUS] & E1000_STATUS_LU) &&
diff --git a/net/tap.c b/net/tap.c
index bd01590..07676ce 100644
--- a/net/tap.c
+++ b/net/tap.c
@@ -67,6 +67,8 @@ static void tap_writable(void *opaque);
static void tap_update_ fd_handler( TAPState *s) set_fd_ handler( s->fd,
s-> read_poll && s->enabled ? tap_send : NULL,
s-> write_poll && s->enabled ? tap_writable : NULL,
{
+ fprintf(stderr, "%s read_poll %d write_poll %d enabled %d\n",
+ __func__, s->read_poll, s->write_poll, s->enabled);
qemu_