[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/6] qtest: add test framework
From: |
Avi Kivity |
Subject: |
Re: [Qemu-devel] [PATCH 1/6] qtest: add test framework |
Date: |
Mon, 16 Jan 2012 19:08:52 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111222 Thunderbird/9.0 |
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
Re: [Qemu-devel] [PATCH 1/6] qtest: add test framework, Michael Walle, 2012/01/17