Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Feb 2023 22:52:26 GMT
From:      Eric Joyner <erj@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: b4e0be6df772 - stable/12 - vtd: Increase DRHD_MAX_UNITS
Message-ID:  <202302062252.316MqQuQ007651@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by erj:

URL: https://cgit.FreeBSD.org/src/commit/?id=b4e0be6df772a3bd5f235e2a840ff4fdbe57e2d1

commit b4e0be6df772a3bd5f235e2a840ff4fdbe57e2d1
Author:     Eric Joyner <erj@FreeBSD.org>
AuthorDate: 2023-01-30 21:34:03 +0000
Commit:     Eric Joyner <erj@FreeBSD.org>
CommitDate: 2023-02-06 22:52:10 +0000

    vtd: Increase DRHD_MAX_UNITS
    
    Observed on a couple Ice Lake-SP platforms (Intel Coyote Pass, Dell
    R750), there are more than 8 DRHD sections enumerated in the DMAR ACPI
    section.  Since the previous limit was 8, this resulted in some of these
    not being parsed by vtd when the iommu is initialized; in this case when
    PCI devices are being passthru'd to a bhyve VM.
    
    This omission later causes a kernel panic later in initialization when
    devices could not be found in a valid DRHD scope because the DHRD
    containing the device's scope was not added to vtd.
    
    Signed-off-by: Eric Joyner <erj@FreeBSD.org>
    
    PR:             268486
    Sponsored by:   Intel Corporation
    Reviewed by:    rew@, corvink@
    Differential Revision:  https://reviews.freebsd.org/D38285
    
    (cherry picked from commit 53545967642d850eee4f2dd9fa27cae52ae981b9)
---
 sys/amd64/vmm/intel/vtd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/amd64/vmm/intel/vtd.c b/sys/amd64/vmm/intel/vtd.c
index 489e7c179f2d..de5676b908d1 100644
--- a/sys/amd64/vmm/intel/vtd.c
+++ b/sys/amd64/vmm/intel/vtd.c
@@ -117,7 +117,7 @@ struct domain {
 
 static SLIST_HEAD(, domain) domhead;
 
-#define	DRHD_MAX_UNITS	8
+#define	DRHD_MAX_UNITS	16
 static ACPI_DMAR_HARDWARE_UNIT	*drhds[DRHD_MAX_UNITS];
 static int			drhd_num;
 static struct vtdmap		*vtdmaps[DRHD_MAX_UNITS];



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