On 04/10/2016 14:36, Peter Maydell wrote: > > - 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?
I think the first method makes sense. The second would be the wrong side. Paolo