On 01/16/2012 06:59 PM, Stefan Hajnoczi wrote:
> > +        }
> > +        qtest_send_prefix(chr);
> > +        qtest_send(chr, "OK 0x%04x\n", value);
>
> Endianness is a little weird here.  memory.c will byteswap if target
> and device endianness differ.
>
> Imagine the case where we're on an x86 host, running a ppc guest,
> reading from PCI configuration space (little-endian).  Since ppc
> (target endian) is big-endian and the device is little-endian the
> value read/written will be byteswapped.  However, our qtest runs on
> the host and therefore we don't want that automatic swap (or we need
> to neutralize it by performing another byteswap on top).
>

Good catch.  This is another example of how an access depends not only
on the destination, but also on the source.  Here the source is not the
cpu; it's qtest.

-- 
error compiling committee.c: too many arguments to function


Reply via email to