From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47940) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WXawZ-00087V-Fq for qemu-devel@nongnu.org; Tue, 08 Apr 2014 14:40:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WXawQ-0007xo-FI for qemu-devel@nongnu.org; Tue, 08 Apr 2014 14:40:23 -0400 Sender: Paolo Bonzini Message-ID: <53444269.2010906@redhat.com> Date: Tue, 08 Apr 2014 14:39:37 -0400 From: Paolo Bonzini MIME-Version: 1.0 References: <1395272166-687-1-git-send-email-andreas.faerber@web.de> <1395272166-687-3-git-send-email-andreas.faerber@web.de> <53402437.7030400@web.de> <53406704.7060705@reactos.org> <6E25F26C-1559-464E-8443-F10777A65472@suse.de> <53406C7D.7040404@reactos.org> <5342FD15.2000502@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PULL for-2.0 2/7] raven: Implement non-contiguous I/O region List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: =?UTF-8?B?SGVydsOpIFBvdXNz?= =?UTF-8?B?aW5lYXU=?= , =?UTF-8?B?QW5kcmVhcyBGw6Q=?= =?UTF-8?B?cmJlcg==?= , "qemu-ppc@nongnu.org" , Alexander Graf , QEMU Developers Il 08/04/2014 10:37, Peter Maydell ha scritto: > I think it's actually worse than that. address_space_read/write > have an API which requires you to pass them a buffer which is > in guest CPU endianness. This means they cannot be used from > target-independent source files (like hw/pci-host/prep.c) > because there's no way to say "write this 32 bit value to > the buffer in target endianness". ioport.c which has pretty > much identical code works OK because it is built per target. So the fix could be to compile prep.c per-target (and change to DEVICE_NATIVE_ENDIAN too). > Worse, we have two versions of the ldl_p()/stl_p() &c > functions with conflicting semantics! > cpu-all.h defines these to be "target CPU endianness". > bswap.h defines these to be "host CPU endianness". Ouch! I have some cleanups for CPU ld/st ready for 2.1, I'll add a patch to rename bswap.h's definition to ldl_host_p/stl_host_p. Paolo