Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IOMMU initialization without BIOS support

NOTE: if you have an AMD A55 chipset on a motherboard that support IOMMU, please send me a copy of your /sys/firmware/acpi/tables/DMAR (or whatever the name is that describes IOMMU). There is no risk of any sort for you. Thanks!


Most motherboard manufacturers don't bother releasing IOMMU enabled BIOS (no option in the BIOS).

My undesranding of this document from AMD is that the BIOS initializes the IOMMU by adding ACPI tables.

So if I can get a dump of the ACPI tables (acpidump/acpiextract) from a system with a different motherboard but the same chipset that supports IOMMU, would it be possible to activate IOMMU by inserting these tables at some point before the iommu module is loaded?

If iommu is built into the kernel (not as module), is there any mechanism that allows to change acpi tables on the fly at an early stage of the kernel boot? Otherwise maybe the bootloader (grub/lilo) can do that?

Very likely some addresses within these "new" tables would need updating. Would these addresses be in the existing ACPI tables (so that diffing would help)?

like image 507
Eric Avatar asked Aug 24 '15 08:08

Eric


People also ask

How do I enable IOMMU in BIOS?

This option is available on servers with AMD processors. From the System Utilities screen, select System Configuration > BIOS/Platform Configuration (RBSU) > Virtualization Options > AMD (R) IOMMU. Select one of the following: Enabled.

Does Intel have IOMMU?

Intel Virtualization Technology for Direct I/O [Intel VT-d] is an I/O memory management unit (IOMMU) designed for the VMM (Virtual Machine Monitor), to support I/O virtualization. Since Intel VT-d has the capability of fine-grained access control per device, it is a better mitigation for DMA attacks.

How do I enable IOMMU in grub?

To enable SR-IOV in the kernel, configure intel_iommu=on in the grub file. To get the best performance, add iommu=pt (pass-through) to the grub file when using SR-IOV. When in pass-through mode, the adapter does not need to use DMA translation to the memory, and this improves the performance.


1 Answers

Good question. We have a mechanism to load an additional DSDT (see Documentation/acpi/dsdt-overriding.txt), also some methods can be overridden (method-customizing.txt) but I'm not sure about DMAR table. At least ACPI specification doesn't say it's possible to use like this. I think you may hack your kernel and try to do such, but would it be upstreamable?

UPDATE. Oh, this one looks promising: Documentation/acpi/initrd_table_override.txt

like image 119
0andriy Avatar answered Oct 03 '22 08:10

0andriy