Re: [Qemu-devel] [PULL for-2.0 2/7] raven: Implement non-contiguous I/O region

2014-04-08 Thread Peter Maydell
On 8 April 2014 21:27, Paolo Bonzini wrote: > 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/

Re: [Qemu-devel] [PULL for-2.0 2/7] raven: Implement non-contiguous I/O region

2014-04-08 Thread Paolo Bonzini
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

Re: [Qemu-devel] [PULL for-2.0 2/7] raven: Implement non-contiguous I/O region

2014-04-08 Thread Peter Maydell
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. >> Worse, we have two versions of the ldl_p()/stl_p() &c >> func

Re: [Qemu-devel] [PULL for-2.0 2/7] raven: Implement non-contiguous I/O region

2014-04-08 Thread Paolo Bonzini
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) becau

Re: [Qemu-devel] [PULL for-2.0 2/7] raven: Implement non-contiguous I/O region

2014-04-08 Thread Peter Maydell
On 7 April 2014 20:31, Paolo Bonzini wrote: > I think if you are using address_space_read/write > then you must use DEVICE_NATIVE_ENDIAN 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 mean

Re: [Qemu-devel] [PULL for-2.0 2/7] raven: Implement non-contiguous I/O region

2014-04-07 Thread Peter Maydell
On 7 April 2014 21:40, Andreas Färber wrote: > Am 07.04.2014 21:32, schrieb Andreas Färber: >> I tested .bswap = false - that fixes ppc64 host but breaks x86_64 host. > > Same results for the following patch (x86_64 broken, ppc64 fixed): > > diff --git a/hw/pci-host/prep.c b/hw/pci-host/prep.c > i

Re: [Qemu-devel] [PULL for-2.0 2/7] raven: Implement non-contiguous I/O region

2014-04-07 Thread Andreas Färber
Am 07.04.2014 21:32, schrieb Andreas Färber: > Am 05.04.2014 22:26, schrieb Hervé Poussineau: >> Hi Andreas, >> >> Le sam. 05 avril 2014 17:41:43 CEST, Andreas Färber a écrit : >>> Hi Hervé, >>> >>> Am 20.03.2014 00:36, schrieb Andreas Färber: From: Hervé Poussineau Remove now dupli

Re: [Qemu-devel] [PULL for-2.0 2/7] raven: Implement non-contiguous I/O region

2014-04-07 Thread Andreas Färber
Am 05.04.2014 22:26, schrieb Hervé Poussineau: > Hi Andreas, > > Le sam. 05 avril 2014 17:41:43 CEST, Andreas Färber a écrit : >> Hi Hervé, >> >> Am 20.03.2014 00:36, schrieb Andreas Färber: >>> From: Hervé Poussineau >>> >>> Remove now duplicated code from prep board. >>> >>> Signed-off-by: Herv

Re: [Qemu-devel] [PULL for-2.0 2/7] raven: Implement non-contiguous I/O region

2014-04-07 Thread Paolo Bonzini
Il 05/04/2014 19:20, Peter Maydell ha scritto: >> It means "default endianness of the guest cpu" so that accesses coming >> from the CPU get passed in the value they had in the CPU registers :). > > > In that case, behaviour should be the same between x86 host and openSUSE > ppc/ppc64 and OSX pp

Re: [Qemu-devel] [PULL for-2.0 2/7] raven: Implement non-contiguous I/O region

2014-04-05 Thread Peter Maydell
On 5 April 2014 21:50, Hervé Poussineau wrote: > Le sam. 05 avril 2014 22:34:38 CEST, Alexander Graf a écrit : >> It means "default endianness of the guest cpu" so that accesses coming >> from the CPU get passed in the value they had in the CPU registers :). > > > In that case, behaviour should be

Re: [Qemu-devel] [PULL for-2.0 2/7] raven: Implement non-contiguous I/O region

2014-04-05 Thread Hervé Poussineau
Le sam. 05 avril 2014 22:34:38 CEST, Alexander Graf a écrit : On 05.04.2014, at 22:26, Hervé Poussineau wrote: Hi Andreas, Le sam. 05 avril 2014 17:41:43 CEST, Andreas Färber a écrit : Hi Hervé, Am 20.03.2014 00:36, schrieb Andreas Färber: From: Hervé Poussineau Remove now duplicated co

Re: [Qemu-devel] [PULL for-2.0 2/7] raven: Implement non-contiguous I/O region

2014-04-05 Thread Alexander Graf
On 05.04.2014, at 22:26, Hervé Poussineau wrote: > Hi Andreas, > > Le sam. 05 avril 2014 17:41:43 CEST, Andreas Färber a écrit : >> Hi Hervé, >> >> Am 20.03.2014 00:36, schrieb Andreas Färber: >>> From: Hervé Poussineau >>> >>> Remove now duplicated code from prep board. >>> >>> Signed-off-

Re: [Qemu-devel] [PULL for-2.0 2/7] raven: Implement non-contiguous I/O region

2014-04-05 Thread Hervé Poussineau
Hi Andreas, Le sam. 05 avril 2014 17:41:43 CEST, Andreas Färber a écrit : Hi Hervé, Am 20.03.2014 00:36, schrieb Andreas Färber: From: Hervé Poussineau Remove now duplicated code from prep board. Signed-off-by: Hervé Poussineau Signed-off-by: Andreas Färber --- hw/pci-host/prep.c | 85 +

Re: [Qemu-devel] [PULL for-2.0 2/7] raven: Implement non-contiguous I/O region

2014-04-05 Thread Andreas Färber
Hi Hervé, Am 20.03.2014 00:36, schrieb Andreas Färber: > From: Hervé Poussineau > > Remove now duplicated code from prep board. > > Signed-off-by: Hervé Poussineau > Signed-off-by: Andreas Färber > --- > hw/pci-host/prep.c | 85 > hw/ppc/prep.

[Qemu-devel] [PULL for-2.0 2/7] raven: Implement non-contiguous I/O region

2014-03-19 Thread Andreas Färber
From: Hervé Poussineau Remove now duplicated code from prep board. Signed-off-by: Hervé Poussineau Signed-off-by: Andreas Färber --- hw/pci-host/prep.c | 85 hw/ppc/prep.c | 94 ++ 2 file