From: Tomoyuki Hirose <tomoyuki.hirose@igel.co.jp>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org, Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [PATCH 2/2] hw/usb/hcd-xhci.c: allow unaligned access to Capability Registers
Date: Mon, 18 Dec 2023 18:50:18 +0900 [thread overview]
Message-ID: <CAFS=EcndyH6cDr7EntmWdrWU6kgKXsK94vTWeTyJ71dhd0sZ4g@mail.gmail.com> (raw)
In-Reply-To: <CAFEAcA83J==kC5qUZBw8jE75iy=F0ojUKL2uvonU0RZ7iCqjSQ@mail.gmail.com>
On Tue, Dec 12, 2023 at 7:26 PM Peter Maydell <peter.maydell@linaro.org> wrote:
>
> On Tue, 12 Dec 2023 at 01:43, Tomoyuki Hirose
> <tomoyuki.hirose@igel.co.jp> wrote:
> >
> > Thanks for comment.
> >
> > On Mon, Dec 11, 2023 at 10:57 PM Peter Maydell <peter.maydell@linaro.org> wrote:
> > > 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.
> >
> > Shouldn't I link this bug report?
> > Or is it not appropriate to allow unaligned access?
>
> The bug report is definitely relevant. But depending
> on how tricky the unaligned access handling turns out to
> be to get right, we might be able to fix the bug by
> permitting aligned-but-not-4-bytes accesses. (I'm
> a bit surprised that doesn't work already, in fact:
> we use it in other devices.)
>
> thanks
> -- PMM
Thank you for answering my question.
The unaligned access handling of my patch is not so tricky.
If the access is unaligned, just correct the access size
and address and read the value as before.
Also, it is allowed by the specifications, and byte access
was possible even on real devices.
Regards,
Tomoyuki HIROSE
next prev parent reply other threads:[~2023-12-18 9:51 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-11 7:12 [PATCH 0/2] support unaligned access for some xHCI registers Tomoyuki HIROSE
2023-12-11 7:12 ` [PATCH 1/2] system/memory.c: support unaligned access Tomoyuki HIROSE
2023-12-11 13:31 ` Cédric Le Goater
2023-12-15 0:11 ` Tomoyuki Hirose
2024-01-12 15:48 ` Peter Maydell
2024-01-18 6:43 ` Tomoyuki Hirose
2023-12-11 7:12 ` [PATCH 2/2] hw/usb/hcd-xhci.c: allow unaligned access to Capability Registers Tomoyuki HIROSE
2023-12-11 13:57 ` Peter Maydell
2023-12-12 1:43 ` Tomoyuki Hirose
2023-12-12 10:25 ` Peter Maydell
2023-12-18 9:50 ` Tomoyuki Hirose [this message]
2024-03-18 16:18 ` Peter Xu
2023-12-19 4:48 ` [PATCH 0/2] support unaligned access for some xHCI registers Tomoyuki Hirose
2023-12-19 11:26 ` Peter Maydell
2023-12-20 1:11 ` Tomoyuki Hirose
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAFS=EcndyH6cDr7EntmWdrWU6kgKXsK94vTWeTyJ71dhd0sZ4g@mail.gmail.com' \
--to=tomoyuki.hirose@igel.co.jp \
--cc=kraxel@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).