diff --git a/src/iommu_preface.adoc b/src/iommu_preface.adoc index 3df69ca..4efe894 100644 --- a/src/iommu_preface.adoc +++ b/src/iommu_preface.adoc @@ -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]. diff --git a/src/iommu_sw_guidelines.adoc b/src/iommu_sw_guidelines.adoc index 24e96fe..e0ba891 100644 --- a/src/iommu_sw_guidelines.adoc +++ b/src/iommu_sw_guidelines.adoc @@ -319,6 +319,18 @@ Device-context whose `V` (valid) bit is clear, non-leaf PDT entries whose `V` 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