From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JRD4y-0005lg-Gu for qemu-devel@nongnu.org; Mon, 18 Feb 2008 15:59:12 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JRD4w-0005kq-TY for qemu-devel@nongnu.org; Mon, 18 Feb 2008 15:59:12 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JRD4w-0005kn-QB for qemu-devel@nongnu.org; Mon, 18 Feb 2008 15:59:10 -0500 Received: from e32.co.us.ibm.com ([32.97.110.150]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JRD4v-0004zi-TD for qemu-devel@nongnu.org; Mon, 18 Feb 2008 15:59:10 -0500 Received: from d03relay02.boulder.ibm.com (d03relay02.boulder.ibm.com [9.17.195.227]) by e32.co.us.ibm.com (8.13.8/8.13.8) with ESMTP id m1IKwOjA010224 for ; Mon, 18 Feb 2008 15:58:24 -0500 Received: from d03av03.boulder.ibm.com (d03av03.boulder.ibm.com [9.17.195.169]) by d03relay02.boulder.ibm.com (8.13.8/8.13.8/NCO v8.7) with ESMTP id m1IKwZ4o219588 for ; Mon, 18 Feb 2008 13:58:35 -0700 Received: from d03av03.boulder.ibm.com (loopback [127.0.0.1]) by d03av03.boulder.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m1IKwYeD020855 for ; Mon, 18 Feb 2008 13:58:35 -0700 From: Hollis Blanchard Content-Type: text/plain Date: Mon, 18 Feb 2008 14:57:57 -0600 Message-Id: <1203368277.3428.62.camel@basalt> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] endianness and network emulation for PowerPC Reply-To: Hollis Blanchard , qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Rob Landley Cc: firmware@them.com, qemu-devel I've been debugging network problems in qemu for a week or two, and there seem to be some pervasive misunderstandings about endianness. I'm trying to use a big-endian target on a big-endian guest, and this has exposed a lot of breakage, including qemu's pci-host.h, isa_mmio.c, rtl8139.c and ne2000.c. Rob, I noticed that you're using Linux's "ne.c" in your PowerPC PReP kernel build for qemu, and to my surprise it actually works for me on a big-endian host! I'm wondering if you chose ne.c because you found the other network drivers to be broken? (Actually I believe this is also working by accident: outsw() in Linux writes big-endian data, which is incorrectly swapped in isa_mmio.c, and then incorrectly swapped again in ne2000.c.) -- Hollis Blanchard IBM Linux Technology Center