[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH 0/5] support unaligned access to xHCI Capability
From: |
Tomoyuki HIROSE |
Subject: |
[RFC PATCH 0/5] support unaligned access to xHCI Capability |
Date: |
Fri, 8 Nov 2024 12:29:44 +0900 |
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
- [RFC PATCH 0/5] support unaligned access to xHCI Capability,
Tomoyuki HIROSE <=
- [RFC PATCH 1/5] hw/nvme/ctrl: specify the 'valid' field in MemoryRegionOps, Tomoyuki HIROSE, 2024/11/07
- [RFC PATCH 2/5] system/memory: support unaligned access, Tomoyuki HIROSE, 2024/11/07
- [RFC PATCH 3/5] hw/misc: add test device for memory access, Tomoyuki HIROSE, 2024/11/07
- [RFC PATCH 4/5] tests/qtest: add test for memory region access, Tomoyuki HIROSE, 2024/11/07
- [RFC PATCH 5/5] hw/usb/hcd-xhci: allow unaligned access to Capability Registers, Tomoyuki HIROSE, 2024/11/07
- Re: [RFC PATCH 0/5] support unaligned access to xHCI Capability, Tomoyuki HIROSE, 2024/11/26