From owner-svn-src-all@FreeBSD.ORG Thu Jun 26 19:19:06 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EB8F7D9E; Thu, 26 Jun 2014 19:19:06 +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 D846C2E30; Thu, 26 Jun 2014 19:19:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5QJJ63b065612; Thu, 26 Jun 2014 19:19:06 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5QJJ68W065611; Thu, 26 Jun 2014 19:19:06 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201406261919.s5QJJ68W065611@svn.freebsd.org> From: John Baldwin Date: Thu, 26 Jun 2014 19:19:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267928 - stable/10/usr.sbin/bhyve X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jun 2014 19:19:07 -0000 Author: jhb Date: Thu Jun 26 19:19:06 2014 New Revision: 267928 URL: http://svnweb.freebsd.org/changeset/base/267928 Log: 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.) Modified: stable/10/usr.sbin/bhyve/consport.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyve/consport.c ============================================================================== --- stable/10/usr.sbin/bhyve/consport.c Thu Jun 26 17:59:23 2014 (r267927) +++ stable/10/usr.sbin/bhyve/consport.c Thu Jun 26 19:19:06 2014 (r267928) @@ -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);