Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Nov 2013 23:31:01 +0000 (UTC)
From:      Neel Natu <neel@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r258609 - head/usr.sbin/bhyve
Message-ID:  <201311252331.rAPNV19d089941@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311252331.rAPNV19d089941>