From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: Oleksii Kurochko <oleksii.kurochko@gmail.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Anthony PERARD <anthony.perard@vates.tech>,
Michal Orzel <michal.orzel@amd.com>,
Julien Grall <julien@xen.org>,
Stefano Stabellini <sstabellini@kernel.org>,
xen-devel@lists.xenproject.org
Subject: Re: [PATCH for-4.22] char/ns16550: bound execution time of ns16550_interrupt()
Date: Tue, 23 Jun 2026 16:19:08 +0200 [thread overview]
Message-ID: <ajqV3OLhVwkmxGMV@macbook.local> (raw)
In-Reply-To: <c3d0c6cd-cc4e-48cc-a0fd-a455a6d4917d@suse.com>
On Tue, Jun 23, 2026 at 03:46:11PM +0200, Jan Beulich wrote:
> On 23.06.2026 15:36, Oleksii Kurochko wrote:
> > On 6/23/26 12:31 PM, Roger Pau Monne wrote:
> >> The current logic in ns16550_interrupt() will loop until the device sets
> >> the NOINT in IIR. At least on the Lenovo ThinkSystem SR630 V4 the flow
> >> control of the serial-over-lan emulated UART seems to be broken, as it
> >> doesn't set the NOINT bit consistently. The Transmitter Holding Register
> >> Empty in LSR also seems to not be properly signaled, as even with it set
> >> writes to the transmit register take ~6ms. This leads to the watchdog
> >> triggering very easily on such system.
> >>
> >> Introduce an upper bound on the execution time of ns16550_interrupt(), this
> >> is currently set as 4x the polling interval, which is calculated as the
> >> time to fill RX FIFO and/or empty TX FIFO. The current maximum is 5ms.
> >> Once the timeout triggers the interrupt is disabled and the uart is
> >> switched to polling mode.
> >
> > Don't you mmiss Fixes: tag?
>
> Fixes: "SoL on Lenovo ThinkSystem SR630 V4"
>
> you mean? I think there's nothing wrong with our pre-existing code, and
> the changes here instead are a workaround for some (apparently) badly
> implemented SoL.
It was on purpose that no Fixes tag was provided.
Xen code would be fine with well-behaved uarts, however most of the
serial-over-lan emulated ones are not well behaved it seems.
There's a possible issue with the unbounded loop in
ns16550_interrupt() as it's relying solely on hardware register values
to terminate, which again would be OK if hardware was correctly
implemented. I don't think this warrants a Fixes tag.
Thanks, Roger.
next prev parent reply other threads:[~2026-06-23 14:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-23 10:31 [PATCH for-4.22] char/ns16550: bound execution time of ns16550_interrupt() Roger Pau Monne
2026-06-23 13:36 ` Oleksii Kurochko
2026-06-23 13:46 ` Jan Beulich
2026-06-23 14:19 ` Roger Pau Monné [this message]
2026-06-23 13:44 ` Jan Beulich
2026-06-23 14:16 ` Roger Pau Monné
2026-06-23 14:27 ` Jan Beulich
2026-06-23 15:54 ` Roger Pau Monné
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=ajqV3OLhVwkmxGMV@macbook.local \
--to=roger.pau@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=anthony.perard@vates.tech \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=michal.orzel@amd.com \
--cc=oleksii.kurochko@gmail.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.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 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.