qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/5] support unaligned access to xHCI Capability
@ 2024-11-08  3:29 Tomoyuki HIROSE
  2024-11-08  3:29 ` [RFC PATCH 1/5] hw/nvme/ctrl: specify the 'valid' field in MemoryRegionOps Tomoyuki HIROSE
                   ` (5 more replies)
  0 siblings, 6 replies; 27+ messages in thread
From: Tomoyuki HIROSE @ 2024-11-08  3:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: Tomoyuki HIROSE

This patch set aims to support unaligned access to xHCI Capability
Registers.

To achieve this, we introduce the emulation of an unaligned access
through multiple aligned accesses. This patch set also adds a test
device and several tests using this device to verify that the
emulation functions correctly.

Using these changes, unaligned access to xHCI Capability Registers is
now supported.

During development, I required a lot of 'MemoryRegionOps' structs with
its own read/write functions for tests. In the QEMU project, a large
number of similar functions or structs are often written in '.inc'
files. I followed this approach for the test functions but would
appreciate feedback on whether this is appropriate.

Tomoyuki HIROSE (5):
  hw/nvme/ctrl: specify the 'valid' field in MemoryRegionOps
  system/memory: support unaligned access
  hw/misc: add test device for memory access
  tests/qtest: add test for memory region access
  hw/usb/hcd-xhci: allow unaligned access to Capability Registers

 hw/misc/Kconfig                         |    4 +
 hw/misc/memaccess-testdev.c             |  197 +++
 hw/misc/meson.build                     |    1 +
 hw/nvme/ctrl.c                          |    5 +
 hw/usb/hcd-xhci.c                       |    4 +-
 include/hw/misc/memaccess-testdev.h     |   42 +
 include/hw/misc/memaccess-testdev.h.inc | 1864 +++++++++++++++++++++++
 system/memory.c                         |  147 +-
 system/physmem.c                        |    8 -
 tests/qtest/memaccess-test.c            |  598 ++++++++
 tests/qtest/meson.build                 |    9 +
 11 files changed, 2842 insertions(+), 37 deletions(-)
 create mode 100644 hw/misc/memaccess-testdev.c
 create mode 100644 include/hw/misc/memaccess-testdev.h
 create mode 100644 include/hw/misc/memaccess-testdev.h.inc
 create mode 100644 tests/qtest/memaccess-test.c

-- 
2.43.0



^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2025-01-15  2:02 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-08  3:29 [RFC PATCH 0/5] support unaligned access to xHCI Capability Tomoyuki HIROSE
2024-11-08  3:29 ` [RFC PATCH 1/5] hw/nvme/ctrl: specify the 'valid' field in MemoryRegionOps Tomoyuki HIROSE
2024-11-08  3:29 ` [RFC PATCH 2/5] system/memory: support unaligned access Tomoyuki HIROSE
2024-12-02 21:23   ` Peter Xu
2024-12-06  8:31     ` Tomoyuki HIROSE
2024-12-06 16:42       ` Peter Xu
2024-12-11  9:35         ` Tomoyuki HIROSE
2024-12-11 22:54           ` Peter Xu
2024-12-12  5:39             ` Tomoyuki HIROSE
2024-12-12 15:46               ` Peter Xu
2025-01-08  2:58                 ` Tomoyuki HIROSE
2025-01-08 16:50                   ` Peter Xu
2025-01-10 10:11                     ` Tomoyuki HIROSE
2025-01-10 15:08                       ` Peter Xu
2025-01-15  2:01                         ` Tomoyuki HIROSE
2024-12-11  9:56         ` Peter Maydell
2024-12-11 22:25           ` Peter Xu
2024-11-08  3:29 ` [RFC PATCH 3/5] hw/misc: add test device for memory access Tomoyuki HIROSE
2024-11-08  3:29 ` [RFC PATCH 4/5] tests/qtest: add test for memory region access Tomoyuki HIROSE
2024-11-08  3:29 ` [RFC PATCH 5/5] hw/usb/hcd-xhci: allow unaligned access to Capability Registers Tomoyuki HIROSE
2024-11-27  4:32 ` [RFC PATCH 0/5] support unaligned access to xHCI Capability Tomoyuki HIROSE
2024-11-27 11:23   ` Peter Maydell
2024-11-28  6:19     ` Tomoyuki HIROSE
2024-11-28 11:15       ` Peter Maydell
2024-11-29  3:33         ` Tomoyuki HIROSE
2024-12-02 14:17           ` Peter Maydell
2024-12-04 10:04             ` Tomoyuki HIROSE

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).