Skip to content

Commit

Permalink
manual: add DMA passthrough section
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandermbrown committed Feb 8, 2024
1 parent a6e3070 commit 5a3c188
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions docs/MANUAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,24 @@ in the device tree. See device tree bindings documentation for the platform's
interrupt controller (e.g the GIC) or for the specific device you are trying to use.
Note that not all devices encode interrupts the same.

## Passing through DMA devices

Devices which communicate through DMA see the world though host physical
addresses, however virtual machines will give devices guest physical addresses
(i.e., host virtual addresses). In order for DMA passthrough to work, these two
addresses must be aligned. This can be done by setting the `phys_addr` of the
guest's RAM to be the same as its mapped virtual address.
```xml
<memory_region name="guest_ram" size="0x10_000_000" phys_addr="0x20000000" page_size="0x200_000" />
<protection_domain ...>
<virtual_machine ...>
<map mr="guest_ram" vaddr="0x20000000" perms="rwx" />
<!-- ... -->
</virtual_machine>
<!-- ... -->
</protection_domain>
```

# Adding platform support

This section will describe how to add support for a new platform to the `simple`
Expand Down

0 comments on commit 5a3c188

Please sign in to comment.