]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
hw/char/exynos4210_uart: Fix missing call to report ready for input
authorIris Johnson <iris@modwiz.com>
Sat, 30 Jan 2021 18:40:17 +0000 (18:40 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 2 Feb 2021 17:00:54 +0000 (17:00 +0000)
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>
Message-id: 20210130184016.1787097-1-iris@modwiz.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/char/exynos4210_uart.c

index 9b21d201b3417fa88c1d63dac74eab468f4b0b80..80d401a3795c6e002c62969aaeb7922969a10635 100644 (file)
@@ -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);