From: Peter Xu <peterx@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Tomoyuki HIROSE" <tomoyuki.hirose@igel.co.jp>,
qemu-devel@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>,
"David Hildenbrand" <david@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: Re: [RFC PATCH 2/5] system/memory: support unaligned access
Date: Wed, 11 Dec 2024 17:25:18 -0500 [thread overview]
Message-ID: <Z1oRTipSYMq3WvmZ@x1n> (raw)
In-Reply-To: <CAFEAcA-6KksbRmL7V0dm_0KJ_zgsaJqCkuTpswbbefyjdVeFCw@mail.gmail.com>
On Wed, Dec 11, 2024 at 09:56:21AM +0000, Peter Maydell wrote:
> On Fri, 6 Dec 2024 at 16:43, Peter Xu <peterx@redhat.com> wrote:
> > I assume it's about xhci_cap_ops then. If you agree we can also mention
> > xhci_cap_ops when dscribing it, so readers can easily reference the MR
> > attributes from the code alongside with understanding the use case.
> >
> > Does it mean that it could also work if xhci_cap_ops.impl.min_access_size
> > can be changed to 2 (together with additional xhci_cap_read/write support)?
> >
> > Note that I'm not saying it must do so even if it would work for xHCI, but
> > if the memory API change is only for one device, then it can still be
> > discussed about which option would be better on changing the device or the
> > core.
>
> I think the memory system core has been broken in this area
> for a long time -- it purports to support impls which only
> do a subset of what the valid operations are, but it actually
> does buggy and wrong things in some cases. So far
> we have effectively worked around it by avoiding defining
> MemoryRegionOps that try to use the buggy areas, but I
> think it's much better to fix the code so it really does
> what it's theoretically intended to do.
Thanks, Peter. I assume it means there're a lot of devices that can use
this model. Then it makes perfect sense to do it in memory core.
Though I do have some confusion on why we needed impl.unaligned at all. I
see that Tomoyuki raised similar question, even if not exactly the same
one. I'll try to continue the discussion there.
--
Peter Xu
next prev parent reply other threads:[~2024-12-11 22:27 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
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=Z1oRTipSYMq3WvmZ@x1n \
--to=peterx@redhat.com \
--cc=david@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=tomoyuki.hirose@igel.co.jp \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.