Repository navigation
Conversation
gierens
force-pushed
the
dmar
branch
2 times, most recently
from
October 16, 2026 12:29
1397d52 to
2dd0557
Compare
gierens
marked this pull request as draft
October 16, 2026 12:31
This adds sdt::dmar module containing the types for parsing ACPI DMAR tables. It follows the definitions in the "Intel(R) Virtualization Technology for Directed I/O Architecture Specification" (https://software.intel.com/content/dam/develop/public/us/en/documents/vt-directed-io-spec.pdf) section 8.1. At the root is the Dmar with the function entries, returning an iterator over the DmarEntry enum. This can contain the structs DrhdEntry, RmrrEntry, AtsrEntry, RhsaEntry, AnddEntry, SatcEntry, and SidpEntry. Some of these contain DeviceScopes also returned as iterator. Signed-off-by: Sandro-Alessio Gierens <sandro@gierens.de>
gierens
marked this pull request as ready for review
October 16, 2026 12:58
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds
sdt::dmarmodule containing the types for parsing ACPI DMARtables. It follows the definitions in the "Intel(R) Virtualization
Technology for Directed I/O Architecture Specification"
(https://software.intel.com/content/dam/develop/public/us/en/documents/vt-directed-io-spec.pdf)
section 8.1.
At the root is the
Dmarwith the function entries, returning an iterator overthe
DmarEntryenum. This can contain the structsDrhdEntry,RmrrEntry,AtsrEntry,RhsaEntry,AnddEntry,SatcEntry, orSidpEntry. Some of thesecontain
DeviceScopes also returned as iterator.For testing I created a small repo with a minimal kernel and runner program
that you can find here: https://github.com/gierens/acpi-dmar-demo
It just sets up the logger, page table, allocator, and then parses the ACPI
tables, of which it then prints the DMAR, entries, and device scopes.
cargo runlaunches the kernel in QEMU with-machine q35,accel=kvm,kernel_irqchip=split -device intel-iommu,intremap=on,caching-mode=on(see https://github.com/gierens/acpi-dmar-demo/blob/main/src/main.rs#L31-L34)
which yields a single DRHD entry in DMAR.
Using the following code:
in
kernel/src/main.rs(see https://github.com/gierens/acpi-dmar-demo/blob/main/kernel/src/main.rs#L42-L52) it then prints:This fixes #105 , probably better to open another issue for IVRS