Re: [Qemu-devel] Re: [PATCH] Always swap endianness in DBDMA

2009-12-24 Thread Alexander Graf
On 24.12.2009, at 01:08, Aurelien Jarno wrote: > On Thu, Dec 24, 2009 at 12:39:36AM +0100, Laurent Vivier wrote: >> Le mercredi 23 décembre 2009 à 10:55 +, Paul Brook a écrit : The problem is that the whole define is just plain wrong which tells me that the code is using the bswap f

Re: [Qemu-devel] Re: [PATCH] Always swap endianness in DBDMA

2009-12-23 Thread Aurelien Jarno
On Thu, Dec 24, 2009 at 12:39:36AM +0100, Laurent Vivier wrote: > Le mercredi 23 décembre 2009 à 10:55 +, Paul Brook a écrit : > > > The problem is that the whole define is just plain wrong which tells me > > > that the code is using the bswap functions incorrectly. This really > > > needs to b

Re: [Qemu-devel] Re: [PATCH] Always swap endianness in DBDMA

2009-12-23 Thread Laurent Vivier
Le mercredi 23 décembre 2009 à 10:55 +, Paul Brook a écrit : > [2] My guess is that the code is cribbed from elsewhere, and the original > source gave the CPU direct access to the ch->regs[] array. In fact it comes from Mac-On-Linux, src/drivers/dbdma.c Laurent -- - laur

Re: [Qemu-devel] Re: [PATCH] Always swap endianness in DBDMA

2009-12-23 Thread Laurent Vivier
Le mercredi 23 décembre 2009 à 10:55 +, Paul Brook a écrit : > > The problem is that the whole define is just plain wrong which tells me > > that the code is using the bswap functions incorrectly. This really > > needs to be fixed by someone who knows the dbdma device. I don't see how > > calli

Re: [Qemu-devel] Re: [PATCH] Always swap endianness in DBDMA

2009-12-23 Thread Paul Brook
> The problem is that the whole define is just plain wrong which tells me > that the code is using the bswap functions incorrectly. This really > needs to be fixed by someone who knows the dbdma device. I don't see how > calling incorrect calls even more incorrect makes any difference. The real pr

[Qemu-devel] Re: [PATCH] Always swap endianness in DBDMA

2009-12-23 Thread Alexander Graf
On 23.12.2009, at 11:06, Aurelien Jarno wrote: > On Wed, Dec 23, 2009 at 10:29:53AM +0100, Alexander Graf wrote: >> >> On 23.12.2009, at 07:12, Aurelien Jarno wrote: >> >>> On Tue, Dec 22, 2009 at 02:45:17PM +0100, Alexander Graf wrote: When we get an MMIO request, we always get variables

[Qemu-devel] Re: [PATCH] Always swap endianness in DBDMA

2009-12-23 Thread Aurelien Jarno
On Wed, Dec 23, 2009 at 10:29:53AM +0100, Alexander Graf wrote: > > On 23.12.2009, at 07:12, Aurelien Jarno wrote: > > > On Tue, Dec 22, 2009 at 02:45:17PM +0100, Alexander Graf wrote: > >> When we get an MMIO request, we always get variables in host endianness. > >> The > >> only time we need t

[Qemu-devel] Re: [PATCH] Always swap endianness in DBDMA

2009-12-23 Thread Alexander Graf
On 23.12.2009, at 07:12, Aurelien Jarno wrote: > On Tue, Dec 22, 2009 at 02:45:17PM +0100, Alexander Graf wrote: >> When we get an MMIO request, we always get variables in host endianness. The >> only time we need to actually reverse byte order is when we read bytes from >> guest memory. >> >> A

[Qemu-devel] Re: [PATCH] Always swap endianness in DBDMA

2009-12-22 Thread Aurelien Jarno
On Tue, Dec 22, 2009 at 02:45:17PM +0100, Alexander Graf wrote: > When we get an MMIO request, we always get variables in host endianness. The > only time we need to actually reverse byte order is when we read bytes from > guest memory. > > Apparently the DBDMA implementation is different there. A

[Qemu-devel] Re: [PATCH] Always swap endianness in DBDMA

2009-12-22 Thread Michael S. Tsirkin
On Tue, Dec 22, 2009 at 01:07:20PM +0100, Alexander Graf wrote: > Michael S. Tsirkin wrote: > > On Tue, Dec 22, 2009 at 11:24:18AM +0100, Alexander Graf wrote: > > > >> When we get an MMIO request, we always get variables in host endianness. > >> The > >> only time we need to actually reverse b

[Qemu-devel] Re: [PATCH] Always swap endianness in DBDMA

2009-12-22 Thread Alexander Graf
Michael S. Tsirkin wrote: > On Tue, Dec 22, 2009 at 11:24:18AM +0100, Alexander Graf wrote: > >> When we get an MMIO request, we always get variables in host endianness. The >> only time we need to actually reverse byte order is when we read bytes from >> guest memory. >> >> Apparently the DBDMA

[Qemu-devel] Re: [PATCH] Always swap endianness in DBDMA

2009-12-22 Thread Michael S. Tsirkin
On Tue, Dec 22, 2009 at 11:24:18AM +0100, Alexander Graf wrote: > When we get an MMIO request, we always get variables in host endianness. The > only time we need to actually reverse byte order is when we read bytes from > guest memory. > > Apparently the DBDMA implementation is different there. A