From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41832) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WXcdX-0006hT-Ba for qemu-devel@nongnu.org; Tue, 08 Apr 2014 16:29:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WXcdO-00021V-6K for qemu-devel@nongnu.org; Tue, 08 Apr 2014 16:28:51 -0400 Sender: Paolo Bonzini Message-ID: <53445BCE.3030504@redhat.com> Date: Tue, 08 Apr 2014 16:27:58 -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> <53444269.2010906@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: "qemu-ppc@nongnu.org" , =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= , =?UTF-8?B?SGVydsOpIFBvdXNzaW5lYXU=?= , Alexander Graf , QEMU Developers Il 08/04/2014 14:55, Peter Maydell ha scritto: > On 8 April 2014 19:39, Paolo Bonzini wrote: >> So the fix could be to compile prep.c per-target (and change to >> DEVICE_NATIVE_ENDIAN too). > > That seems like the wrong direction -- we should be > making fewer files per-target, not more. I agree, and in fact we should also use DEVICE_NATIVE_ENDIAN less, not more. Unfortunately, forwarding accesses from one address space to another via MMIO accessors requires DEVICE_NATIVE_ENDIAN, and that in turn requires target-endianness ldl_p/stl_p. We could to try and make the non-contiguous I/O region an IOMMU region, if that can work. But that would be post-2.0, I think. I'm of course assuming that we cannot just revert patch 2 in this series... >>> 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. > > Richard's suggestion was to make the cpu-all.h ones > be ldl_te_p/stl_te_p, which I think I like better. > We could do both in order to enforce that we audited > everything to see which it thought it was :-) Yes, that's the next obvious step. Paolo