Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Jul 2017 06:49:58 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r321414 - stable/11/sys/amd64/vmm/io
Message-ID:  <201707240649.v6O6nwef043972@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Mon Jul 24 06:49:57 2017
New Revision: 321414
URL: https://svnweb.freebsd.org/changeset/base/321414

Log:
  MFC r302843:
  Increase number of I/O APIC pins from 24 to 32 to give PCI up to 16 IRQs.
  
  Move HPET to the top of the supported 0-31 range.

Modified:
  stable/11/sys/amd64/vmm/io/vhpet.c
  stable/11/sys/amd64/vmm/io/vioapic.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/amd64/vmm/io/vhpet.c
==============================================================================
--- stable/11/sys/amd64/vmm/io/vhpet.c	Mon Jul 24 06:19:04 2017	(r321413)
+++ stable/11/sys/amd64/vmm/io/vhpet.c	Mon Jul 24 06:49:57 2017	(r321414)
@@ -715,8 +715,10 @@ vhpet_init(struct vm *vm)
 	vhpet->freq_sbt = bttosbt(bt);
 
 	pincount = vioapic_pincount(vm);
-	if (pincount >= 24)
-		allowed_irqs = 0x00f00000;	/* irqs 20, 21, 22 and 23 */
+	if (pincount >= 32)
+		allowed_irqs = 0xff000000;	/* irqs 24-31 */
+	else if (pincount >= 20)
+		allowed_irqs = 0xf << (pincount - 4);	/* 4 upper irqs */
 	else
 		allowed_irqs = 0;
 

Modified: stable/11/sys/amd64/vmm/io/vioapic.c
==============================================================================
--- stable/11/sys/amd64/vmm/io/vioapic.c	Mon Jul 24 06:19:04 2017	(r321413)
+++ stable/11/sys/amd64/vmm/io/vioapic.c	Mon Jul 24 06:49:57 2017	(r321414)
@@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$");
 #define	IOREGSEL	0x00
 #define	IOWIN		0x10
 
-#define	REDIR_ENTRIES	24
+#define	REDIR_ENTRIES	32
 #define	RTBL_RO_BITS	((uint64_t)(IOART_REM_IRR | IOART_DELIVS))
 
 struct vioapic {



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