From owner-svn-src-head@FreeBSD.ORG Tue Apr 8 21:02:04 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4816D23D; Tue, 8 Apr 2014 21:02:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 358D814EE; Tue, 8 Apr 2014 21:02:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s38L24FP015340; Tue, 8 Apr 2014 21:02:04 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s38L24Kl015339; Tue, 8 Apr 2014 21:02:04 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201404082102.s38L24Kl015339@svn.freebsd.org> From: John Baldwin Date: Tue, 8 Apr 2014 21:02:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r264277 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Apr 2014 21:02:04 -0000 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);