From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7C792C433F5 for ; Thu, 3 Feb 2022 13:41:29 +0000 (UTC) Received: from localhost ([::1]:36682 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nFcMa-0005l6-Jd for qemu-devel@archiver.kernel.org; Thu, 03 Feb 2022 08:41:28 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47422) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nFcJw-0003C9-0P for qemu-devel@nongnu.org; Thu, 03 Feb 2022 08:38:44 -0500 Received: from mail03.asahi-net.or.jp ([202.224.55.15]:44174) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nFcJt-0004Uw-AB for qemu-devel@nongnu.org; Thu, 03 Feb 2022 08:38:43 -0500 Received: from sakura.ysato.name (ik1-413-38519.vs.sakura.ne.jp [153.127.30.23]) (Authenticated sender: PQ4Y-STU) by mail03.asahi-net.or.jp (Postfix) with ESMTPA id 7BB91219A9; Thu, 3 Feb 2022 22:38:36 +0900 (JST) Received: from SIOS1075.ysato.ml (ZM005235.ppp.dion.ne.jp [222.8.5.235]) by sakura.ysato.name (Postfix) with ESMTPSA id 7D8A11C008E; Thu, 3 Feb 2022 22:38:35 +0900 (JST) Date: Thu, 03 Feb 2022 22:38:32 +0900 Message-ID: <87v8xw1353.wl-ysato@users.sourceforge.jp> From: Yoshinori Sato To: Peter Maydell Subject: Re: [PATCH 1/2] hw/char/renesas_sci: Add fifo buffer to backend interface. In-Reply-To: References: <20220131094246.772550-1-ysato@users.sourceforge.jp> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Received-SPF: softfail client-ip=202.224.55.15; envelope-from=ysato@users.sourceforge.jp; helo=mail03.asahi-net.or.jp X-Spam_score_int: -11 X-Spam_score: -1.2 X-Spam_bar: - X-Spam_report: (-1.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , Magnus Damm , Philippe =?ISO-8859-1?Q?Mathieu-Daud=E9?= , qemu-devel@nongnu.org, =?ISO-8859-1?Q?Marc-Andr=E9?= Lureau , Paolo Bonzini Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Wed, 02 Feb 2022 03:54:45 +0900, Peter Maydell wrote: > > On Tue, 1 Feb 2022 at 17:47, Yoshinori Sato wrote: > > > > On Tue, 01 Feb 2022 15:48:58 +0900, > > Thomas Huth wrote: > > > > > > On 31/01/2022 10.42, Yoshinori Sato wrote: > > > If you describe it like this, it sounds like you're now emulating a > > > buffer that is not there with real hardware? Is that really what you > > > want here, i.e. wouldn't this hide problems with the real hardware > > > that are mitigated in QEMU with this buffer? > > > > There is no such buffer in the real hardware. > > It's not possible with real hardware, but the chardev backend passes > > data faster than the bitrate. > > There is no problem if the received data is supplied at the timing when > > it can be received, but since it is difficult to match the timing accurately, > > we expect that the buffer will absorb the difference in timing. > > If you can't accept receiving more data from the chardev backend, > your serial device model should be returning 0 from can_receive. If 0 is returned, the character to be received will be dropped. There is no problem if it is an interactive operation, but when connecting to a socket and communicating continuously, data will be lost if the timing does not match. > I don't think we should model a FIFO that doesn't exist in > the real hardware. > > thanks > -- PMM > -- Yosinori Sato