From owner-svn-src-head@FreeBSD.ORG Mon Nov 25 23:31:01 2013 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 75D408A9; Mon, 25 Nov 2013 23:31:01 +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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 65443220E; Mon, 25 Nov 2013 23:31:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPNV14c089945; Mon, 25 Nov 2013 23:31:01 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPNV19d089941; Mon, 25 Nov 2013 23:31:01 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201311252331.rAPNV19d089941@svn.freebsd.org> From: Neel Natu Date: Mon, 25 Nov 2013 23:31:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258609 - 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.16 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: Mon, 25 Nov 2013 23:31:01 -0000 Author: neel Date: Mon Nov 25 23:31:00 2013 New Revision: 258609 URL: http://svnweb.freebsd.org/changeset/base/258609 Log: Fix discrepancy between the IOAPIC ID advertised by firmware tables and the actual value read by the guest from the device. The IOAPIC ID is now set to zero in both MPtable/ACPI tables as well as in the ioapic device emulation. Pointed out by: grehan@ Modified: head/usr.sbin/bhyve/acpi.c head/usr.sbin/bhyve/mptbl.c Modified: head/usr.sbin/bhyve/acpi.c ============================================================================== --- head/usr.sbin/bhyve/acpi.c Mon Nov 25 22:58:12 2013 (r258608) +++ head/usr.sbin/bhyve/acpi.c Mon Nov 25 23:31:00 2013 (r258609) @@ -263,7 +263,7 @@ basl_fwrite_madt(FILE *fp) EFPRINTF(fp, "[0001]\t\tSubtable Type : 01\n"); EFPRINTF(fp, "[0001]\t\tLength : 0C\n"); /* iasl expects a hex value for the i/o apic id */ - EFPRINTF(fp, "[0001]\t\tI/O Apic ID : %02x\n", basl_ncpu); + EFPRINTF(fp, "[0001]\t\tI/O Apic ID : %02x\n", 0); EFPRINTF(fp, "[0001]\t\tReserved : 00\n"); EFPRINTF(fp, "[0004]\t\tAddress : fec00000\n"); EFPRINTF(fp, "[0004]\t\tInterrupt : 00000000\n"); Modified: head/usr.sbin/bhyve/mptbl.c ============================================================================== --- head/usr.sbin/bhyve/mptbl.c Mon Nov 25 22:58:12 2013 (r258608) +++ head/usr.sbin/bhyve/mptbl.c Mon Nov 25 23:31:00 2013 (r258609) @@ -279,12 +279,12 @@ mptable_build(struct vmctx *ctx, int ncp mpch->entry_count += MPE_NUM_BUSES; mpei = (io_apic_entry_ptr)curraddr; - mpt_build_ioapic_entries(mpei, ncpu + 1); + mpt_build_ioapic_entries(mpei, 0); curraddr += sizeof(*mpei); mpch->entry_count++; mpie = (int_entry_ptr) curraddr; - mpt_build_ioint_entries(mpie, MPEII_MAX_IRQ, ncpu + 1); + mpt_build_ioint_entries(mpie, MPEII_MAX_IRQ, 0); curraddr += sizeof(*mpie) * MPEII_MAX_IRQ; mpch->entry_count += MPEII_MAX_IRQ;