On Sat, 5 Oct 2019 at 16:04, Philippe Mathieu-Daudé <f4...@amsat.org> wrote: > > This device implementation is clearly restricted to 32-bit > accesses. Set the MemoryRegionOps::impl min/max access_size > fields to simplify the code, and remove the hw_error() call. > > Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> > --- > hw/dma/etraxfs_dma.c | 25 ++++--------------------- > 1 file changed, 4 insertions(+), 21 deletions(-) > > @@ -701,6 +680,10 @@ static const MemoryRegionOps dma_ops = { > .read = dma_read, > .write = dma_write, > .endianness = DEVICE_NATIVE_ENDIAN, > + .impl = { > + .min_access_size = 4, > + .max_access_size = 4, > + }, > .valid = { > .min_access_size = 1, > .max_access_size = 4
Unless I've forgotten how the memory layer works, doesn't this mean we'll now try to synthesize 1 and 2 byte accesses by making 4 byte accesses ? Would it be better to just set the .valid.min_access_size to 4 ? (The indent on the change looks a bit suspect but that's because the whole file is tab-indent.) thanks -- PMM