From: Jason Wang <jasowang@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Dmitry Fleytman <dmitry.fleytman@gmail.com>,
"Michael S. Tsirkin" <mst@redhat.com>, Li Qiang <liq3ea@163.com>,
Li Qiang <liq3ea@gmail.com>,
QEMU Developers <qemu-devel@nongnu.org>,
Alexander Bulekov <alxndr@bu.edu>,
Stefan Hajnoczi <stefanha@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH 2/2] e1000e: make TX reentrant
Date: Fri, 24 Jul 2020 12:00:05 +0800 [thread overview]
Message-ID: <67267c28-f706-700a-d1aa-6e5cd8ef0c8d@redhat.com> (raw)
In-Reply-To: <CAFEAcA-XHFXBeQ9qp91T_gzNqyxEEDz_caHanwMuYRjKjEocWQ@mail.gmail.com>
On 2020/7/23 下午6:36, Peter Maydell wrote:
> On Wed, 22 Jul 2020 at 10:00, Jason Wang <jasowang@redhat.com> wrote:
>> In loopback mode, e1000e RX can DMA into TX doorbell which requires
>> TX to be reentrant. This patch make e1000e's TX routine reentrant by
>> introducing a per device boolean for recording whether or not a TX
>> rountine is being called and return early.
>>
>> Signed-off-by: Jason Wang <jasowang@redhat.com>
>> ---
> This feels like a sticking-plaster fix that's not really in the
> right place... It stops us from calling back into
> e1000e_start_xmit(), but it doesn't prevent a DMA request
> from touching other device registers that update state in
> the E100ECore struct that the transmit code is not expecting
> to change.
Right, so we can track the mr owner and fail the memory access if
there's another mr transaction in memory core:
memory_region_dispatch_read() and memory_region_dispatch_write().
But what's more interesting is that some device uses bh for the doorbell
which may require more thought...
Thanks
>
> thanks
> -- PMM
>
next prev parent reply other threads:[~2020-07-24 4:02 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-22 8:57 [PATCH 1/2] net: forbid the reentrant RX Jason Wang
2020-07-22 8:57 ` [PATCH 2/2] e1000e: make TX reentrant Jason Wang
2020-07-22 11:24 ` Li Qiang
2020-07-23 2:22 ` Jason Wang
2020-07-22 12:53 ` Michael Tokarev
2020-07-23 2:25 ` Jason Wang
2020-07-23 12:01 ` Stefan Hajnoczi
2020-07-23 10:36 ` Peter Maydell
2020-07-24 4:00 ` Jason Wang [this message]
2020-07-28 4:00 ` [PATCH 1/2] net: forbid the reentrant RX Jason Wang
2020-09-02 15:56 ` Alexander Bulekov
2020-09-03 3:56 ` Jason Wang
2020-09-03 4:02 ` Alexander Bulekov
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=67267c28-f706-700a-d1aa-6e5cd8ef0c8d@redhat.com \
--to=jasowang@redhat.com \
--cc=alxndr@bu.edu \
--cc=dmitry.fleytman@gmail.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 \
--cc=stefanha@redhat.com \
/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).