aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Joyner <erj@FreeBSD.org>2023-01-30 21:34:03 +0000
committerEric Joyner <erj@FreeBSD.org>2023-01-31 21:57:42 +0000
commit53545967642d850eee4f2dd9fa27cae52ae981b9 (patch)
tree5688fd0b88783f0f0b12d9f7781eb5f489457e37
parentdc57ec3ca0fbd11d351a4ca1e305a29dd1dc74f5 (diff)
downloadsrc-53545967642d850eee4f2dd9fa27cae52ae981b9.tar.gz
src-53545967642d850eee4f2dd9fa27cae52ae981b9.zip
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@ MFC after: 1 day Differential Revision: https://reviews.freebsd.org/D38285
-rw-r--r--sys/amd64/vmm/intel/vtd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/amd64/vmm/intel/vtd.c b/sys/amd64/vmm/intel/vtd.c
index 21e81223f6ee..b860e4de3817 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];