]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Use separate descriptors in bhyve's stdio uart backend.
authorMark Johnston <markj@FreeBSD.org>
Mon, 22 Apr 2019 13:57:52 +0000 (13:57 +0000)
committerMark Johnston <markj@FreeBSD.org>
Mon, 22 Apr 2019 13:57:52 +0000 (13:57 +0000)
commitd6ef759e5d14eb9e29a8fc30f086e6ad2bd71448
tree73c1e3a76641a19efc83cb45c61ef43434cdb536
parentcddbc3b40812213ff00041f79174cac0be360a2a
Use separate descriptors in bhyve's stdio uart backend.

bhyve was previously using stdin for both reading and writing to the
console, which made it difficult to redirect console output.  Use
stdin for reading and stdout for writing.  This makes it easier to use
bhyve as a backend for syzkaller.

As a side effect, the change fixes a minor bug which would cause bhyve
to fail with ENOTCAPABLE if configured to use nmdm for com1 and stdio
for com2.

bhyveload already uses separate descriptors, as does the bvmcons driver.

Reviewed by: jhb
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D19788
usr.sbin/bhyve/uart_emul.c