From b9c113aaddcaca13df2468957f03cbb8614c0792 Mon Sep 17 00:00:00 2001 From: jhb Date: Thu, 26 Jun 2014 19:19:06 +0000 Subject: MFC 264277: Handle single-byte reads from the bvmcons port (0x220) by returning 0xff. Some guests may attempt to read from this port to identify psuedo-PNP ISA devices. (The ie(4) driver in FreeBSD/i386 is one example.) --- usr.sbin/bhyve/consport.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/usr.sbin/bhyve/consport.c b/usr.sbin/bhyve/consport.c index b9eb4ce..4074e95 100644 --- a/usr.sbin/bhyve/consport.c +++ b/usr.sbin/bhyve/consport.c @@ -110,6 +110,15 @@ console_handler(struct vmctx *ctx, int vcpu, int in, int port, int bytes, return (0); } + /* + * Guests might probe this port to look for old ISA devices + * using single-byte reads. Return 0xff for those. + */ + if (bytes == 1 && in) { + *eax = 0xff; + return (0); + } + if (bytes != 4) return (-1); -- cgit v1.1