[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] qtest: add read/write accessors with a specific
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH] qtest: add read/write accessors with a specific endianness |
Date: |
Tue, 4 Oct 2016 13:36:09 +0100 |
On 4 October 2016 at 13:17, Cédric Le Goater <address@hidden> wrote:
> Some test scenarios require to access memory regions using a specific
> endianness, such as a device region, but the current qtest memory
> accessors are done in native endian, which means that the values are
> byteswapped in qtest if the endianness of the guest and the host are
> different.
>
> To maintain the endianness of a value, we need a new set of memory
> accessor. This can be done in two ways:
>
> - first, convert the value to the required endianness in libqtest and
> then use the memread/write routines so that qtest accesses the guest
> memory without doing any supplementary byteswapping
>
> - an alternative method would be to handle the byte swapping on the
> qtest side. For that, we would need to extend the read/write
> protocol with an ending word : "native|le|be" and modify the tswap
> calls accordingly under the qtest_process_command() routine.
>
> The result is the same and the first method is simpler.
The difficulty with this patch is that it's hard to tell whether
it's really required, or if this is just adding an extra layer
of byteswapping that should really be done in some other location
in the stack. What's the actual test case here?
thanks
-- PMM
- [Qemu-devel] [PATCH] qtest: add read/write accessors with a specific endianness, Cédric Le Goater, 2016/10/04
- Re: [Qemu-devel] [PATCH] qtest: add read/write accessors with a specific endianness,
Peter Maydell <=
- Re: [Qemu-devel] [PATCH] qtest: add read/write accessors with a specific endianness, Laurent Vivier, 2016/10/04
- Re: [Qemu-devel] [PATCH] qtest: add read/write accessors with a specific endianness, Cédric Le Goater, 2016/10/04
- Re: [Qemu-devel] [PATCH] qtest: add read/write accessors with a specific endianness, Paolo Bonzini, 2016/10/04
- Re: [Qemu-devel] [PATCH] qtest: add read/write accessors with a specific endianness, David Gibson, 2016/10/04
- Re: [Qemu-devel] [PATCH] qtest: add read/write accessors with a specific endianness, Cédric Le Goater, 2016/10/05
- Re: [Qemu-devel] [PATCH] qtest: add read/write accessors with a specific endianness, Peter Maydell, 2016/10/05
- Re: [Qemu-devel] [PATCH] qtest: add read/write accessors with a specific endianness, Cédric Le Goater, 2016/10/05
- Re: [Qemu-devel] [PATCH] qtest: add read/write accessors with a specific endianness, Peter Maydell, 2016/10/05
- Re: [Qemu-devel] [PATCH] qtest: add read/write accessors with a specific endianness, Cédric Le Goater, 2016/10/05
- Re: [Qemu-devel] [PATCH] qtest: add read/write accessors with a specific endianness, Peter Maydell, 2016/10/05