From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NuXCJ-0001Bk-Gi for qemu-devel@nongnu.org; Wed, 24 Mar 2010 16:29:03 -0400 Received: from [140.186.70.92] (port=43140 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NuXCH-0001A4-KU for qemu-devel@nongnu.org; Wed, 24 Mar 2010 16:29:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NuXCB-0006sk-Tu for qemu-devel@nongnu.org; Wed, 24 Mar 2010 16:29:00 -0400 Received: from mail-pv0-f173.google.com ([74.125.83.173]:32973) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NuXCB-0006sX-Mv for qemu-devel@nongnu.org; Wed, 24 Mar 2010 16:28:55 -0400 Received: by pvf33 with SMTP id 33so3479758pvf.4 for ; Wed, 24 Mar 2010 13:28:54 -0700 (PDT) Message-ID: <4BAA75F9.8040602@codemonkey.ws> Date: Wed, 24 Mar 2010 15:28:41 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: Compile files only once: some planning References: <20100324193903.GA11004@redhat.com> <20100324200848.GA11133@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: qemu-devel , "Michael S. Tsirkin" On 03/24/2010 03:24 PM, Blue Swirl wrote: > On 3/24/10, Michael S. Tsirkin wrote: > >> On Wed, Mar 24, 2010 at 10:05:10PM +0200, Blue Swirl wrote: >> > On 3/24/10, Michael S. Tsirkin wrote: >> > > On Tue, Mar 23, 2010 at 11:43:51PM +0200, Blue Swirl wrote: >> > > > rtl8139.c, e1000.c: need to convert ldl/stl to cpu_physical_memory_read/write. >> > > >> > > >> > > I don't see how it would help. These still get target_phys_addr_t which >> > > is per-target. Further, a ton of devices do >> > > cpu_register_physical_memory/qemu_register_coalesced_mmio. >> > > These are also per target. >> > >> > I don't know what I was eating yesterday: there are no references to >> > ldl/stl in either rtl8139 or e1000. In fact, the conversion is simple >> > for the device itself, just add a property "be". The attached patch >> > performs this part. >> > >> > But now there is a bigger problem, how to pass the property to the >> > device. It's not fair to require the user to remember to set it. >> >> >> I still don't fully understand how come e1000 cares about >> target endianness. >> > It shouldn't. Maybe the real fix is to remove the byte swapping. > My previous pci memory functions patches removed the byte swapping. The problem is that PCI devices are going to operate in little endian mode (usually) whereas the CPU may be acting in big endian mode. We need to do a byte swap somewhere but the better place to do it is in the PCI bus layer. Regards, Anthony Liguori