summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2014-04-08 21:02:03 +0000
committerjhb <jhb@FreeBSD.org>2014-04-08 21:02:03 +0000
commit808e531530813c805e5f01db2b51e22340fd77a6 (patch)
tree8e982a2a17348660121cde663158854d9094fe62
parent2008848cc035c86ab5c5d1246afa3b04ef595a1f (diff)
downloadFreeBSD-src-808e531530813c805e5f01db2b51e22340fd77a6.zip
FreeBSD-src-808e531530813c805e5f01db2b51e22340fd77a6.tar.gz
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.) Reviewed by: grehan
-rw-r--r--usr.sbin/bhyve/consport.c9
1 files changed, 9 insertions, 0 deletions
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);
OpenPOWER on IntegriCloud