GIPC: Introduce G-stage table In Process Context (GIPC) #43
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.
The current G-stage page table of RISC-V IOMMU resides within the device context and is only bound to one DC (G-stage table In Device Context - GIDC). Consequently, this limits the SHWQ (shared hardware work queue) to serve only one virtual machine. The SHWQ uses process_id to distinguish the different address spaces. So, adding iohgatp into Process Context could make SHWQ serve different virtual machines.
The GIPC (G-stage table In Process Context) capability [1] adds iohgatp in PC (Process Context), and makes RISC-V IOMMU support GIPC and GIDC simultaneously. This improves the virtualization scalability of heterogeneous programming in shared hardware work queue scenarios [2].
Because RVI hasn't ratified GIPC, this patch uses custom bit fields of dc.tc & capability regs.
[1] riscv-non-isa/riscv-iommu#413
[2] https://www.youtube.com/watch?v=-fuqzYedOb0