[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH 5/5] hw/usb/hcd-xhci: allow unaligned access to Capability Re
From: |
Tomoyuki HIROSE |
Subject: |
[RFC PATCH 5/5] hw/usb/hcd-xhci: allow unaligned access to Capability Registers |
Date: |
Fri, 8 Nov 2024 12:29:49 +0900 |
According to xHCI spec rev 1.2, unaligned access to xHCI Host
Controller Capability Registers is not prohibited. In addition, the
limit of access size is also unspecified. Actually, some real devices
allow unaligned access and 8-byte access to these registers.
This commit makes it possible to unaligned access and 8-byte access to
Host Controller Capability Registers.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/143
Signed-off-by: Tomoyuki HIROSE <tomoyuki.hirose@igel.co.jp>
---
hw/usb/hcd-xhci.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
index d85adaca0d..f35cbe526f 100644
--- a/hw/usb/hcd-xhci.c
+++ b/hw/usb/hcd-xhci.c
@@ -3165,9 +3165,11 @@ static const MemoryRegionOps xhci_cap_ops = {
.read = xhci_cap_read,
.write = xhci_cap_write,
.valid.min_access_size = 1,
- .valid.max_access_size = 4,
+ .valid.max_access_size = 8,
+ .valid.unaligned = true,
.impl.min_access_size = 4,
.impl.max_access_size = 4,
+ .impl.unaligned = false,
.endianness = DEVICE_LITTLE_ENDIAN,
};
--
2.43.0
- [RFC PATCH 0/5] support unaligned access to xHCI Capability, Tomoyuki HIROSE, 2024/11/07
- [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 <=
- Re: [RFC PATCH 0/5] support unaligned access to xHCI Capability, Tomoyuki HIROSE, 2024/11/26