qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PULL for-2.0 2/7] raven: Implement non-contiguous I/O region
Date: Tue, 08 Apr 2014 14:39:37 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]