From: Stefan Hajnoczi <stefanha@gmail.com>
To: Bug 1467240 <1467240@bugs.launchpad.net>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Bug 1467240] [NEW] Regression - bridged networking broken for Mac OS X guest
Date: Mon, 22 Jun 2015 11:26:38 +0100 [thread overview]
Message-ID: <20150622102638.GF20966@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <20150621112608.24532.97250.malonedeb@gac.canonical.com>
[-- Attachment #1: Type: text/plain, Size: 2624 bytes --]
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 <famz@redhat.com>
> 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
index bab8e2a..2f68c6d 100644
--- a/hw/net/e1000.c
+++ b/hw/net/e1000.c
@@ -174,6 +174,7 @@ enum {
static void
e1000_link_down(E1000State *s)
{
+ fprintf(stderr, "%s link down\n", __func__);
s->mac_reg[STATUS] &= ~E1000_STATUS_LU;
s->phy_reg[PHY_STATUS] &= ~MII_SR_LINK_STATUS;
s->phy_reg[PHY_STATUS] &= ~MII_SR_AUTONEG_COMPLETE;
@@ -183,6 +184,7 @@ e1000_link_down(E1000State *s)
static void
e1000_link_up(E1000State *s)
{
+ fprintf(stderr, "%s link up\n", __func__);
s->mac_reg[STATUS] |= E1000_STATUS_LU;
s->phy_reg[PHY_STATUS] |= MII_SR_LINK_STATUS;
}
@@ -923,6 +925,12 @@ e1000_can_receive(NetClientState *nc)
{
E1000State *s = qemu_get_nic_opaque(nc);
+ fprintf(stderr, "%s lu %d rctl_en %d pci_master %d has_rxbufs %d\n",
+ __func__, s->mac_reg[STATUS] & E1000_STATUS_LU,
+ s->mac_reg[RCTL] & E1000_RCTL_EN,
+ s->parent_obj.config[PCI_COMMAND] & PCI_COMMAND_MASTER,
+ e1000_has_rxbufs(s, 1));
+
return (s->mac_reg[STATUS] & E1000_STATUS_LU) &&
(s->mac_reg[RCTL] & E1000_RCTL_EN) &&
(s->parent_obj.config[PCI_COMMAND] & PCI_COMMAND_MASTER) &&
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)
{
+ fprintf(stderr, "%s read_poll %d write_poll %d enabled %d\n",
+ __func__, s->read_poll, s->write_poll, s->enabled);
qemu_set_fd_handler(s->fd,
s->read_poll && s->enabled ? tap_send : NULL,
s->write_poll && s->enabled ? tap_writable : NULL,
[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2015-06-22 10:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-21 11:26 [Qemu-devel] [Bug 1467240] [NEW] Regression - bridged networking broken for Mac OS X guest Jonathan Liu
2015-06-22 8:39 ` Peter Maydell
2015-06-22 10:26 ` Stefan Hajnoczi [this message]
2015-06-22 10:49 ` [Qemu-devel] [Bug 1467240] " Jonathan Liu
2015-06-22 12:49 ` Stefan Hajnoczi
2015-06-22 10:54 ` Jonathan Liu
2015-06-22 15:20 ` Jonathan Liu
2015-06-25 1:10 ` Jonathan Liu
2015-06-25 8:07 ` Stefan Hajnoczi
2018-06-08 11:31 ` Thomas Huth
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=20150622102638.GF20966@stefanha-thinkpad.redhat.com \
--to=stefanha@gmail.com \
--cc=1467240@bugs.launchpad.net \
--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).