All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hw/char/exynos4210_uart: Fix missing call to report ready for input
@ 2021-01-30 18:40 Iris Johnson
  2021-02-02 11:07 ` Peter Maydell
  0 siblings, 1 reply; 2+ messages in thread
From: Iris Johnson @ 2021-01-30 18:40 UTC (permalink / raw)
  Cc: Peter Maydell, Iris Johnson, Igor Mitsyanko,
	open list:All patches CC here, open list:Exynos,
	Marc-André Lureau, Paolo Bonzini

When the frontend device has no space for a read the fd is removed
from polling to allow time for the guest to read and clear the buffer.
Without the call to qemu_chr_fe_accept_input(), the poll will not be
broken out of when the guest has cleared the buffer causing significant
IO delays that get worse with smaller buffers.

Buglink: https://bugs.launchpad.net/qemu/+bug/1913341
Signed-off-by: Iris Johnson <iris@modwiz.com>
---
 hw/char/exynos4210_uart.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/char/exynos4210_uart.c b/hw/char/exynos4210_uart.c
index 6361df2ad3..51ba862d0b 100644
--- a/hw/char/exynos4210_uart.c
+++ b/hw/char/exynos4210_uart.c
@@ -519,6 +519,7 @@ static uint64_t exynos4210_uart_read(void *opaque, hwaddr offset,
             s->reg[I_(UTRSTAT)] &= ~UTRSTAT_Rx_BUFFER_DATA_READY;
             res = s->reg[I_(URXH)];
         }
+        qemu_chr_fe_accept_input(&s->chr);
         exynos4210_uart_update_dmabusy(s);
         trace_exynos_uart_read(s->channel, offset,
                                exynos4210_uart_regname(offset), res);
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] hw/char/exynos4210_uart: Fix missing call to report ready for input
  2021-01-30 18:40 [PATCH] hw/char/exynos4210_uart: Fix missing call to report ready for input Iris Johnson
@ 2021-02-02 11:07 ` Peter Maydell
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Maydell @ 2021-02-02 11:07 UTC (permalink / raw)
  To: Iris Johnson
  Cc: Igor Mitsyanko, Marc-André Lureau, open list:Exynos,
	open list:All patches CC here, Paolo Bonzini

On Sat, 30 Jan 2021 at 18:42, Iris Johnson <iris@modwiz.com> wrote:
>
> When the frontend device has no space for a read the fd is removed
> from polling to allow time for the guest to read and clear the buffer.
> Without the call to qemu_chr_fe_accept_input(), the poll will not be
> broken out of when the guest has cleared the buffer causing significant
> IO delays that get worse with smaller buffers.
>
> Buglink: https://bugs.launchpad.net/qemu/+bug/1913341
> Signed-off-by: Iris Johnson <iris@modwiz.com>
> ---
>  hw/char/exynos4210_uart.c | 1 +



Applied to target-arm.next, thanks.

-- PMM


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-02-02 11:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-30 18:40 [PATCH] hw/char/exynos4210_uart: Fix missing call to report ready for input Iris Johnson
2021-02-02 11:07 ` Peter Maydell

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.