qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: qemu-devel@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>,
	qemu-arm@nongnu.org,
	"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: Re: [PATCH v6 0/7] hw/char/pl011: Implement TX (async) FIFO to avoid blocking the main loop
Date: Thu, 20 Feb 2025 11:04:55 +0000	[thread overview]
Message-ID: <CAFEAcA_PUcnpwti4m1MgGbcVBFFHv1DSvNrzchkqTW5TVMU2pw@mail.gmail.com> (raw)
In-Reply-To: <CAFEAcA-UP5VcDokb11KfpmQztRnWFS9pLcMZ5_2pe=BBKEv7Fg@mail.gmail.com>

On Thu, 20 Feb 2025 at 10:52, Peter Maydell <peter.maydell@linaro.org> wrote:
>
> On Thu, 20 Feb 2025 at 10:43, Peter Maydell <peter.maydell@linaro.org> wrote:
> >
> > On Tue, 18 Feb 2025 at 13:54, Peter Maydell <peter.maydell@linaro.org> wrote:
> > >
> > > On Mon, 17 Feb 2025 at 14:55, Peter Maydell <peter.maydell@linaro.org> wrote:
> > > >
> > > > On Sat, 8 Feb 2025 at 16:39, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
> > > > >
> > > > > Hi,
> > > > >
> > > > > This series add support for (async) FIFO on the transmit path
> > > > > of the PL011 UART.
> > > > >
> > > >
> > > > Applied to target-arm.next, thanks (with a couple of minor
> > > > tweaks to two of the patches).
> > >
> > > Unfortunately I seem to get failures in 'make check-functional'
> > > with the last patch of this series applied.
> >
> > I had a look at this this morning because I wondered if it
> > was a mistake in the style fixups I'd applied to the patches
> > on my end, and I found the bug fairly quickly. The problem is
> > that pl011_xmit() doesn't update the TXFE and TXFF FIFO empty/full
> > status flag bits when it removes characters from the FIFO.
> > So the guest kernel spins forever because TXFF is never unset.
> >
> > The following patch fixes this for me (and also makes us not
> > set INT_TX for the case where we couldn't send any bytes to
> > the chardev, which I noticed reading the code rather than
> > because it had any visible bad effects):
>
> Hmm, but that's clearly not the only problem -- it fixed the
> "no output at all issue", but now I see a test failure because
> of garbled console output:

> I also noticed that pl011_write_txdata() doesn't clear TXFE
> when it puts a byte into the fifo -- I'm testing to see if
> fixing that helps.

Yes, with this patch also:

--- a/hw/char/pl011.c
+++ b/hw/char/pl011.c
@@ -330,6 +330,7 @@ static void pl011_write_txdata(PL011State *s, uint8_t data)
     if (pl011_is_tx_fifo_full(s)) {
         s->flags |= PL011_FLAG_TXFF;
     }
+    s->flags &= ~PL011_FLAG_TXFE;

     pl011_xmit(NULL, G_IO_OUT, s);
 }

this remaining failure is fixed and I get a clean pass (other than
the gpu test failure, but that's not related to the pl011).

-- PMM


      reply	other threads:[~2025-02-20 11:06 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-08 16:39 [PATCH v6 0/7] hw/char/pl011: Implement TX (async) FIFO to avoid blocking the main loop Philippe Mathieu-Daudé
2025-02-08 16:39 ` [PATCH v6 1/7] hw/char/pl011: Warn when using disabled receiver Philippe Mathieu-Daudé
2025-02-08 16:39 ` [PATCH v6 2/7] hw/char/pl011: Add transmit FIFO to PL011State Philippe Mathieu-Daudé
2025-02-08 16:39 ` [PATCH v6 3/7] hw/char/pl011: Introduce pl011_xmit() as GSource Philippe Mathieu-Daudé
2025-02-17 14:25   ` Peter Maydell
2025-02-08 16:39 ` [PATCH v6 4/7] hw/char/pl011: Trace FIFO enablement Philippe Mathieu-Daudé
2025-02-17 14:27   ` Peter Maydell
2025-02-17 14:39     ` Peter Maydell
2025-02-17 14:45       ` Philippe Mathieu-Daudé
2025-02-08 16:39 ` [PATCH v6 5/7] hw/char/pl011: Consider TX FIFO overrun error Philippe Mathieu-Daudé
2025-02-17 14:29   ` Peter Maydell
2025-02-17 14:52     ` Peter Maydell
2025-02-17 15:01       ` Philippe Mathieu-Daudé
2025-02-08 16:39 ` [PATCH v6 6/7] hw/char/pl011: Drain TX FIFO when no backend connected Philippe Mathieu-Daudé
2025-02-17 14:30   ` Peter Maydell
2025-02-08 16:39 ` [PATCH v6 7/7] hw/char/pl011: Implement TX FIFO Philippe Mathieu-Daudé
2025-02-17 14:37   ` Peter Maydell
2025-02-17 14:55 ` [PATCH v6 0/7] hw/char/pl011: Implement TX (async) FIFO to avoid blocking the main loop Peter Maydell
2025-02-18 13:54   ` Peter Maydell
2025-02-20 10:43     ` Peter Maydell
2025-02-20 10:52       ` Peter Maydell
2025-02-20 11:04         ` Peter Maydell [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=CAFEAcA_PUcnpwti4m1MgGbcVBFFHv1DSvNrzchkqTW5TVMU2pw@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=marcandre.lureau@redhat.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=pbonzini@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-arm@nongnu.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).