From owner-svn-src-head@FreeBSD.ORG Fri May 23 05:04:50 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 B47D8C1D; Fri, 23 May 2014 05:04:50 +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 938AE2116; Fri, 23 May 2014 05:04:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4N54oYK014931; Fri, 23 May 2014 05:04:50 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4N54omh014930; Fri, 23 May 2014 05:04:50 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201405230504.s4N54omh014930@svn.freebsd.org> From: Neel Natu Date: Fri, 23 May 2014 05:04:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r266572 - head/sys/amd64/vmm/io 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.18 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: Fri, 23 May 2014 05:04:50 -0000 Author: neel Date: Fri May 23 05:04:50 2014 New Revision: 266572 URL: http://svnweb.freebsd.org/changeset/base/266572 Log: A Centos 6.4 guest will write 0xff to the 8259 mask register before beginning the proper ICWx initialization sequence. It assumes, probably correctly, that the boot firmware has done the 8259 initialization. Since grub-bhyve does not initialize the 8259 this write to the mask register takes a code path in which 'error' remains uninitialized (ready=0,icw_num=0). Fix this by initializing 'error' at the start of the function. Modified: head/sys/amd64/vmm/io/vatpic.c Modified: head/sys/amd64/vmm/io/vatpic.c ============================================================================== --- head/sys/amd64/vmm/io/vatpic.c Fri May 23 01:45:44 2014 (r266571) +++ head/sys/amd64/vmm/io/vatpic.c Fri May 23 05:04:50 2014 (r266572) @@ -591,6 +591,7 @@ vatpic_write(struct vatpic *vatpic, stru int error; uint8_t val; + error = 0; val = *eax; VATPIC_LOCK(vatpic);