Skip to content

Commit

Permalink
Included a software guideline for IOMMU emulation.
Browse files Browse the repository at this point in the history
  • Loading branch information
ved-rivos committed Aug 19, 2024
1 parent de9385f commit 11a39f1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/iommu_preface.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ and corrections, have been made since version 1.0.0:
* Shadow stack encodings introduced by Zicfiss are reserved for IOMMU use.
* Listed the fault codes reported for faults detected by Page Request.
* Updated Fig 31 to remove the unused Destination ID field for ATS.PRGR
* Included a software guideline for IOMMU emulation.
These changes were made through PR#243 cite:[PR243].

Expand Down
12 changes: 12 additions & 0 deletions src/iommu_sw_guidelines.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,18 @@ PTEs whose `V` bit is clear.
Software need not perform invalidations when changing the `V` bit in these
entries from 0 to 1.

==== Guidelines for emulating an IOMMU

Certain uses may involve emulating a RISC-V IOMMU. In such cases, the emulator
may require the IOMMU driver to notify the emulator for efficient operation when
updates are made to in-memory data structure entries, including when making such
entries valid. Queueing an appropriate invalidation command when making such
updates is a common way to provide notifications to the emulator. While usually
an invalidation is not required when marking an invalid entry as valid, the
emulator may indicate the need to invoke such invalidation commands for
emulation efficiency purposes through a suitable flag in the device tree or ACPI
table describing such emulated IOMMU instances.

=== Reconfiguring PMAs

Where platforms support dynamic reconfiguration of PMAs, a machine-mode driver
Expand Down

0 comments on commit 11a39f1

Please sign in to comment.