qemu-devel
[Top][All Lists]
Advanced

[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: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH] qtest: add read/write accessors with a specific endianness
Date: Tue, 4 Oct 2016 19:15:21 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0


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



reply via email to

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