On Fri, 22 Aug 2025 at 10:25, CJ Chen <[email protected]> wrote: > > From: Tomoyuki Hirose <[email protected]> > > This commit adds a test device for checking memory access. The test > device generates memory regions that covers all the legal parameter > patterns. With this device, we can check the handling of > reading/writing the MemoryRegion is correct. > > Co-developed-by: CJ Chen <[email protected]> > Signed-off-by: CJ Chen <[email protected]> > Tested-by: CJ Chen <[email protected]> > Suggested-by: Peter Maydell <[email protected]> > --- > v2: > - Fix the typo of ops size of big-l-valid. > - Replaced the huge macro blocks with dynamic loops that fill in > the `MemoryRegionOps` arrays at runtime. > - Remove test cases valid.unaligned = false,impl.unaligned = true.
> diff --git a/include/hw/misc/memaccess-testdev.h > b/include/hw/misc/memaccess-testdev.h > new file mode 100644 > index 0000000000..c1b17297a2 > --- /dev/null > +++ b/include/hw/misc/memaccess-testdev.h > @@ -0,0 +1,104 @@ > +/* > + * QEMU memory access test device header > + * > + * SPDX-License-Identifier: GPL-2.0-or-later > + * > + * Author: Tomoyuki HIROSE <[email protected]> > + */ > + > +#ifndef HW_MISC_MEMACCESS_TESTDEV_H > +#define HW_MISC_MEMACCESS_TESTDEV_H > + > +#include "system/memory.h" > +#include "hw/qdev-core.h" > + > +#define TYPE_MEM_ACCESS_TEST_DEV "memaccess-testdev" Could we have a comment in this header file that documents what interface the test device presents to tests, please? Both this patch and the test-case patch are hard to review, because I don't know what the test device is trying to do or what the test code is able to assume about the test device. thanks -- PMM
