On 8/17/20 6:18 PM, Philippe Mathieu-Daudé wrote: > This is a follow up on last year patch from Stephen Checkoway: > "block/pflash_cfi02: Implement intereleaved flash devices" > https://www.mail-archive.com/qemu-devel@nongnu.org/msg613077.html > > Instead of making the PFLASH device more complex, I went > implementing a generic interleaver device (that can be re-used > for other MMIO devices, probably pointless, still useful for > simple testing). > > The series is available on [1] and is organized as: > > 1/ Fix a pair of issues in memory.c as we are not exercing much > the memory_region_[read/write]_with_attrs_accessor functions (see > also [2]). > > 2/ Allow to use qtest helpers with the 'none' machine (without any > CPU). > > 3/ Add the interleaver device > > 4/ Add a device to test the interleaver device (later I'll expand > it to other MMIO accesses, such access_with_adjusted_size, endianess > and unaligned accesses). Let the 'none' machine create this device > from command line. > > 5/ Add qtests using 4/ to test 3/. > > 6/ Add a way to display the interleaved memory (sub)regions in > the HMP 'info mtree' command. > > Based-on: <20200816173051.16274-1-f4...@amsat.org> > [1] https://gitlab.com/philmd/qemu/-/tree/interleaved_device-v1 > [2] https://www.mail-archive.com/qemu-devel@nongnu.org/msg730279.html
I followed Paolo's suggestion to use qtest_memread/qtest_memwrite to avoid endianess swapping, and now cross-endianess works :) Review still welcome, but I'll respin in September. Regards, Phil.