From nobody Thu Oct 27 12:57:58 2022 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Mym1g3MQPz4fy2F for ; Thu, 27 Oct 2022 12:57:59 +0000 (UTC) (envelope-from matteo@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Mym1g2qt6z3DNh for ; Thu, 27 Oct 2022 12:57:59 +0000 (UTC) (envelope-from matteo@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666875479; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=1bn2oMc1Jh54JbUNJR5nABGyFHmTW38HMJPwFPfi3Q0=; b=gGLuKXRNoSfLneiUN4M7Ce6TH5CgtXr9TVvJIq6uw6EQM4ah8SrjnvQ+rRjTw6T0GBsIvC 1WjJydRUtEJThwECc4IFjnxq3Lb7dOktni4ZLyeV8v/PqmOdLMT/xpxucnQEYVGQWEsGmj 0gbsjnRtwaGyOKfZOsx0iAOehbqbMyQ9ij9xpNTbsQKcGZ/lD+2zLYrUhX59ljZVd+crCR Qopu+ux/GuCYHu6TSYMmZmUuyBzHwBbmi5elGBcYboCO+toXqDZKibcdBqPFzn7m9M4N2D PUHsR84QpJmuVa2FJ+FqBdWgMNyBiQxUo2g5Sh+/AP77AL2YuIgvFXzmAWUa7w== Received: from ubertino.local (unknown [IPv6:2601:19b:4400:1779::102c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: matteo/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Mym1g177SzqC5 for ; Thu, 27 Oct 2022 12:57:58 +0000 (UTC) (envelope-from matteo@freebsd.org) Date: Thu, 27 Oct 2022 08:57:58 -0400 From: Matteo Riondato To: freebsd-current@freebsd.org Subject: Re: ns8250: UART FCR is broken Message-ID: <20221027125758.nexluqtw6n2tgklq@ubertino.local> X-PGP-Key: http://rionda.to/files/matteogpg.asc References: List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="u772wrfl6ai37fqp" Content-Disposition: inline In-Reply-To: ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666875479; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=1bn2oMc1Jh54JbUNJR5nABGyFHmTW38HMJPwFPfi3Q0=; b=onhjdjMVKkTsoysOeIHCdNPwIZHHvESISFndt75UjPg8KG7NMel4pT2q9BBt65xZhzz+MV FdYYf9reu8ec7nfSqEbDxDoKAEqmSIklTAftaamvBjahApRmXjZY2bYE/W5ha69pwY4UnR 5RgOR+WPeZXB0vx2dRCEbtke9GMyLYzS9zN9JsN6ZOoEC83DNdlcbA6YjUmj4SOaApBUZB 9BRGI9BenVMWkDtsBrdsfENfcDhmlzo+o4sRZ8QZwKxSs4AvW+BHAy4h8QV+SODR4Rvu0w wl1qkJCOX8NQNAmAESiYb8QNrgFGGLUfFeAkJ1O25tk+iLoxWBb+pOkinYSnaw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1666875479; a=rsa-sha256; cv=none; b=Cmu2ZSKuEjihrupPETmwueau3vzal3m5w+1HGqDkV+02vWh0TO6fivBjrpSQyYNujhg8Dl R9gUledeVLnSifHUH0GTFSA6MCOwoyU9WMFjtHVsEXA/UnpIcVy0Mzn273My6wp/ZcazI7 qDKJJfaASXQBZFFY/fd3wPet8pKlmudGik2doJBXORa2QLoH3Vcpdpu5+hMquDNruZxTwV MRpDeMY3gOwq2QZcNpMiP4xWFseDsSWK5krvwwahmyIe5yq6et7qP7F6tvuAT71rELlYpN sELUUAwZ9VHBpnz1D3WFbMpZEHbfbrEmocx/Pi1VKzlqijApH0tgHU2GNqjQEw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N --u772wrfl6ai37fqp Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2022-10-26 at 17:15 EDT, Colin Percival wrote: >On 10/26/22 13:48, Ed Maste wrote: >>On Mon, 24 Oct 2022 at 22:11, void wrote: >>>this started appearing in dmesg >>> >>>ns8250: UART FCR is broken >>>ns8250: UART FCR is broken >> >>This message was added as part of Colin's work to support FreeBSD in=20 >>the Firecracker VMM=20 >>https://cgit.freebsd.org/src/commit/?id=3Dc4b68e7e53bb352be3fa16995b99764= c03097e66 >> >>In this case it indicates that bhyve has the same bug/missing=20 >>functionality as Firecracker -- it doesn't implement the FCR_XMT_RST=20 >>or FCR_RCV_RST bits. You can safely ignore the message, and it will=20 >>disappear once someone adds the required support to bhyve. We should=20 >>probably also have the kernel emit the message only once. I've CC'd=20 >>Colin for comment. > >Indeed, looking at usr.sbin/bhyve/uart_emul.c it looks like FCR_XMT_RST is= =20 >not emulated. This is different from Firecracker, which doesn't emulate= =20 >either anything from the FCR and where I was seeing the receive side not= =20 >being flushed, but I'm glad my warning was able to flag a bug. :-) > >If "void" is comfortable with kernel hacking, it would be great to=20 >confirm >that the warning is indeed coming from the transmit side not=20 >being flushed; a printf("drain =3D %d\n", drain); would be sufficient. > >And yes, only emitting this warning once per device (or once per boot?)=20 >would probably be good. I got the same message on real hardware, no virtualization involved as=20 either host or guest. Is that expected at all? Relevant lines from /var/run/dmesg.boot: ns8250: UART FCR is broken ns8250: UART FCR is broken uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 uart0: console (115200,n,8,1) ns8250: UART FCR is broken ns8250: UART FCR is broken uart1: <16550 or compatible> port 0x2f8-0x2ff irq 3 on acpi0 ns8250: UART FCR is broken Thanks, Matteo --u772wrfl6ai37fqp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJHBAABCgAxFiEEa9uKZL0hP4E8Nl5vGwL9SVQlVQEFAmNagFATGGhrcHM6Ly9w Z3AubWl0LmVkdQAKCRAbAv1JVCVVAdiaD/sH+AwdmtBelsTFQYHTmhQjwUdlUPcJ kfl76olCRnHw+geWQUZ4XpAVwV7GkcJ/4DWRrsVBtLTARgu/jomL40rbwPCD4WlQ xAvZPbgKkOyQrbFhyknY8YDqgMidBqCCidyn19AAqk+NfuERleUbI5d1m6J9XdCJ C1eTBbBsZECwYbGuE/ClswcKvlBxDUNc8RYyd6AX5b7kLOQq8uBJXh+OXM1xuUHd rPQoFzVgCBKnFeOWnpCxhvDp2oVFsx8ZOYKgf/gFdCLDUCwVvohDzcrERvO9pvsm rSpXY+G/s+efKQuBfRER6B8hd1X3IJYPYUOB/q8f6vRehwpk87Oj1yMCZIFs9htf YY8V+yYCsqMcoQ7tr0K7qvx036fjjHNZ5b2dd1tz++IiOCxPFU06C69jcdR7uBWW YqBF2X4tHVQd+UvibhFuBUHzaBdU7ouaT//DYmE9x8xAL6OCbatqMpdYy+iBaHev unP2/Hk1kkoQFUWzIuDRSkIzGV/WBI4i4vwaOG9dkgKVbpD/CMGYult5e7OOtQap fWra8iknqd8e5xd4ujS/nCSkkvVrRx3LWFQ1KoM6G6/1dd7ItnKFcQvRHcLGKLfZ XO8pP6Fx4vahm7MEu+82jlMlNpUxzkp2MXXtybMfzimlP7VONSyrTR6X0EWR8lg9 A1fWChLn0ONvYQ== =j9Ka -----END PGP SIGNATURE----- --u772wrfl6ai37fqp--