Open iaGuoZhi opened 2 years ago
Additionally, Device-TLBs may be utilized by devices to support recoverable I/O page faults.
Recoverable translation faults are detected at the Device-TLB on the device and require the device to support Address Translation Services (ATS) capability.
一次DEVICE-TLB上recoverable page fault的流程:
To enable page requests from an endpoint device, software must:
Initialize the Page Request Queue Head and Tail Registers (see Section 10.4.31 and Section 10.4.32) to zero. Set up the PRQ address and size through the Page Request Queue Address Register (see Section 10.4.33). Configure the scalable-mode context-entry used to process requests from the device, such that the Present (P), Device-TLB Enable (DTE), and Page Request Enable (PRE) fields are Set. Configure and enable page requests at the device through the PRS Capability Registers. (Refer to Address Translation Services (ATS) in PCI Express Base Specification Revision 4.0 or later for PRS Capability Register details).
Software processes Page Request Descriptors written to the Page Request Queue by remapping hardware. Processing the descriptor involves resolving the page-fault condition, creating the translation with appropriate permission and privilege (if the page requested is legitimate), and issuing a response back to the device through the remapping hardware when required.
Translation caches at the remapping hardware is a finite resource that supports requests from multiple endpoint devices. As a result, efficiency of these translation caches in the platform can depend on number of simultaneously active DMA streams in the platform, and address locality of DMA accesses.
One approach to scaling translation caches is to enable endpoint devices to participate in the remapping process with translation caches implemented at the devices.
IOMMU上面的tlb不够用,设备上支持更好