From: Jason Wang <jasowang@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>, Li Qiang <liq3ea@gmail.com>
Cc: Dmitry Fleytman <dmitry.fleytman@gmail.com>,
"Michael S. Tsirkin" <mst@redhat.com>, Li Qiang <liq3ea@163.com>,
QEMU Developers <qemu-devel@nongnu.org>,
Alexander Bulekov <alxndr@bu.edu>,
Gerd Hoffmann <kraxel@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [RFC 0/3] try to solve the DMA to MMIO issue
Date: Fri, 4 Sep 2020 10:45:13 +0800 [thread overview]
Message-ID: <fc472e07-42d3-be91-a95c-e0f800ca1855@redhat.com> (raw)
In-Reply-To: <CAFEAcA9TEpfBmfOOtpfR9JCAFkMF0fy20L=DBVDTFaLp6J3Lfg@mail.gmail.com>
On 2020/9/3 下午7:19, Peter Maydell wrote:
> On Thu, 3 Sep 2020 at 12:11, Li Qiang <liq3ea@gmail.com> wrote:
>> Peter Maydell <peter.maydell@linaro.org> 于2020年9月3日周四 下午6:53写道:
>>> On Thu, 3 Sep 2020 at 04:55, Jason Wang <jasowang@redhat.com> wrote:
>>>> I think we still need to seek a way to address this issue completely.
>>>>
>>>> How about adding a flag in MemoryRegionOps and detect the reentrancy
>>>> through that flag?
>>> This won't catch everything. Consider this situation:
>>> Device A makes DMA access to device B
>>> Device B's write-handling causes it to raise an
>>> outbound qemu_irq signal
>>> The qemu_irq signal is connected to device A
>> Here mean device A is an interrupt controller?
> No. Any device can have an inbound or outbound qemu_irq line.
> We use them not just for actual IRQ lines but for any
> situation where we need to pass an on-or-off signal from
> one device to another.
>
>> This is special case I think.
> It's an example of why looking purely at MMIO is not
> sufficient. We should prefer to see if we can come up with
> a design principle that works for all between-device
> coordination before we implement something that is specific
> to MMIO.
As discussed, maybe we can track the pending operations in device itself
and check it in all the possible entry of device codes (irq, MMIO or
what ever else). This may be easier for stable backport.
Thanks
>
> thanks
> -- PMM
>
prev parent reply other threads:[~2020-09-04 2:46 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-02 16:22 [RFC 0/3] try to solve the DMA to MMIO issue Li Qiang
2020-09-02 16:22 ` [RFC 1/3] e1000e: make the IO handler reentrant Li Qiang
2020-09-02 16:22 ` [RFC 2/3] xhci: " Li Qiang
2020-09-02 16:22 ` [RFC 3/3] virtio-gpu: " Li Qiang
2020-09-03 5:12 ` Michael Tokarev
2020-09-03 10:32 ` Li Qiang
2020-09-03 3:54 ` [RFC 0/3] try to solve the DMA to MMIO issue Jason Wang
2020-09-03 4:06 ` Alexander Bulekov
2020-09-03 4:24 ` Jason Wang
2020-09-03 4:50 ` Li Qiang
2020-09-03 6:16 ` Jason Wang
2020-09-03 6:28 ` Li Qiang
2020-09-03 10:53 ` Peter Maydell
2020-09-03 11:11 ` Li Qiang
2020-09-03 11:19 ` Peter Maydell
2020-09-03 11:23 ` Li Qiang
2020-09-03 11:28 ` Peter Maydell
2020-09-03 13:35 ` Philippe Mathieu-Daudé
2020-09-03 13:41 ` Peter Maydell
2020-09-04 2:45 ` Jason Wang [this message]
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=fc472e07-42d3-be91-a95c-e0f800ca1855@redhat.com \
--to=jasowang@redhat.com \
--cc=alxndr@bu.edu \
--cc=dmitry.fleytman@gmail.com \
--cc=kraxel@redhat.com \
--cc=liq3ea@163.com \
--cc=liq3ea@gmail.com \
--cc=mst@redhat.com \
--cc=pbonzini@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).