Author: jhb
Date: Tue Apr  8 21:02:03 2014
New Revision: 264277
URL: http://svnweb.freebsd.org/changeset/base/264277

Log:
  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

Modified:
  head/usr.sbin/bhyve/consport.c

Modified: head/usr.sbin/bhyve/consport.c
==============================================================================
--- head/usr.sbin/bhyve/consport.c      Tue Apr  8 20:59:02 2014        
(r264276)
+++ head/usr.sbin/bhyve/consport.c      Tue Apr  8 21:02:03 2014        
(r264277)
@@ -110,6 +110,15 @@ console_handler(struct vmctx *ctx, int v
                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);
 
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to