Skip to content

Commit f5a68bb

Browse files
Barret Rhodenjoergroedel
authored andcommitted
iommu/vt-d: Mark firmware tainted if RMRR fails sanity check
RMRR entries describe memory regions that are DMA targets for devices outside the kernel's control. RMRR entries that fail the sanity check are pointing to regions of memory that the firmware did not tell the kernel are reserved or otherwise should not be used. Instead of aborting DMAR processing, this commit marks the firmware as tainted. These RMRRs will still be identity mapped, otherwise, some devices, e.x. graphic devices, will not work during boot. Signed-off-by: Barret Rhoden <[email protected]> Signed-off-by: Lu Baolu <[email protected]> Fixes: f036c7f ("iommu/vt-d: Check VT-d RMRR region in BIOS is reported as reserved") Signed-off-by: Joerg Roedel <[email protected]>
1 parent 5329162 commit f5a68bb

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

drivers/iommu/intel-iommu.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4458,12 +4458,16 @@ int __init dmar_parse_one_rmrr(struct acpi_dmar_header *header, void *arg)
44584458
{
44594459
struct acpi_dmar_reserved_memory *rmrr;
44604460
struct dmar_rmrr_unit *rmrru;
4461-
int ret;
44624461

44634462
rmrr = (struct acpi_dmar_reserved_memory *)header;
4464-
ret = arch_rmrr_sanity_check(rmrr);
4465-
if (ret)
4466-
return ret;
4463+
if (arch_rmrr_sanity_check(rmrr))
4464+
WARN_TAINT(1, TAINT_FIRMWARE_WORKAROUND,
4465+
"Your BIOS is broken; bad RMRR [%#018Lx-%#018Lx]\n"
4466+
"BIOS vendor: %s; Ver: %s; Product Version: %s\n",
4467+
rmrr->base_address, rmrr->end_address,
4468+
dmi_get_system_info(DMI_BIOS_VENDOR),
4469+
dmi_get_system_info(DMI_BIOS_VERSION),
4470+
dmi_get_system_info(DMI_PRODUCT_VERSION));
44674471

44684472
rmrru = kzalloc(sizeof(*rmrru), GFP_KERNEL);
44694473
if (!rmrru)

0 commit comments

Comments
 (0)