[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/2] hw/usb/hcd-xhci.c: allow unaligned access to Capability
From: |
Peter Maydell |
Subject: |
Re: [PATCH 2/2] hw/usb/hcd-xhci.c: allow unaligned access to Capability Registers |
Date: |
Mon, 11 Dec 2023 13:57:42 +0000 |
On Mon, 11 Dec 2023 at 07:13, Tomoyuki HIROSE
<tomoyuki.hirose@igel.co.jp> wrote:
>
> 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.
We should definitely look at fixing the unaligned access
stuff, but the linked bug report is not trying to do an
unaligned access -- it wants to do a 2-byte read from offset 2,
which is aligned. The capability registers in the xHCI spec
are also all at offsets and sizes that mean that a natural
read of them is not unaligned.
thanks
-- PMM
Re: [PATCH 0/2] support unaligned access for some xHCI registers, Tomoyuki Hirose, 2023/12/18