IP Library › Granted Patent US 12,141,075
Granted Patent B2
US 12,141,075 · App. 17/836,936 · Granted Nov 12, 2024

Address translation prefetching for input/output devices

Inventors: Ramakrishna Huggahalli (Scottsdale, AZ); Shachar Raindel (Redmond, WA)
Assignee: Microsoft Technology Licensing, LLC
G06F12/1063G06F12/0238G06F12/063G06F12/0862G06F12/1054
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,141,075
App. No.
17/836,936
Granted
Nov 12, 2024
Kind
B2
Abstract

In one example of the present technology, an input/output memory management unit (IOMMU) of a computing device is configured to: receive a prefetch message including a virtual address from a central processing unit (CPU) core of a processor of the computing device; perform a page walk on the virtual address through a page table stored in a main memory of the computing device to obtain a prefetched translation of the virtual address to a physical address; and store the prefetched translation of the virtual address to the physical address in a translation lookaside buffer (TLB) of the IOMMU.

Claims (52)

1. An input/output memory management unit (IOMMU) of a computing device configured to:

receive a prefetch message comprising a virtual address from a central processing unit (CPU) core of a processor of the computing device;

receive a translation request comprising the virtual address from an input/output device after receiving the prefetch message from the CPU;

perform a page walk on the virtual address through a page table stored in a main memory of the computing device to obtain a prefetched translation of the virtual address to a physical address, wherein IOMMU begins to perform the page walk prior to receiving the translation request from the input/output device;

store the prefetched translation of the virtual address to the physical address in a translation lookaside buffer (TLB) of the IOMMU; and

respond to the translation request from the input/output device with the prefetched translation of the virtual address to the physical address.

2. The IOMMU of claim 1 , further configured to write push the prefetched translation of the virtual address to an input/output device identified in the prefetch message without receiving a translation request from the input/output device.

3. The IOMMU of claim 2 , wherein IOMMU controls the input/output device to store the prefetched translation in an address translation cache of the input/output device.

4. The IOMMU of claim 1 , further configured to:

monitor a number of times the prefetched translation stored in the TLB is used; and

protect the prefetched translation from eviction from the TLB while the number of times the prefetched translation is used is less than a threshold number of times, where the threshold number is greater than zero.

5. The IOMMU of claim 1 , further configured to store the prefetched translation in a host cache of the computing device.

6. The IOMMU of claim 5 , further configured to store the prefetched translation in the host cache in response to detecting that the prefetched translation is displaced from the TLB.

7. A computing device comprising:

a processor comprising:

a central processing unit (CPU) core; and

a system memory management unit (SMMU) comprising a translation lookaside buffer (TLB);

a main memory storing a page table; and

an input/output (I/O) device connected to the processor and the main memory via an interconnect,

the CPU core being configured to:

transmit a direct memory access (DMA) stream setup command to the I/O device, the DMA stream setup command comprising a virtual address; and

transmit a prefetch message to the SMMU, the prefetch message comprising the virtual address included in the DMA stream setup command;

the SMMU being configured to, in response to the prefetch message:

prefetch a translation of the virtual address into a physical address; and

store the prefetched translation of the virtual address into the physical address in the TLB; and

receive an address translation request from the I/O device after receiving the prefetch message from the CPU, wherein SMMU begins to perform a page walk through the page table to prefetch the translation of the virtual address prior to receiving the translation request from the input/output device; and

the I/O device being configured to:

receive the DMA stream setup command;

receive the prefetched translation of the virtual address from the SMMU in response to the address translation request to the SMMU; and

execute a DMA operation with the main memory based on the prefetched translation of the virtual address.

8. The computing device of claim 7 , wherein the SMMU is further configured to:

monitor a number of times the prefetched translation stored in the TLB is used; and

protect the prefetched translation from eviction from the TLB while the number of times the prefetched translation is used is less than a threshold number of times, where the threshold number is greater than zero.

9. The computing device of claim 7 , wherein the processor comprises a host cache, and

wherein the SMMU is further configured to:

store the prefetched translation in the host cache of the computing device.

10. The computing device of claim 9 , wherein the SMMU is further configured to store the prefetched translation in the host cache based on one or more attributes associated with the prefetched translation.

11. The computing device of claim 7 , wherein the SMMU is configured to write push the prefetched translation to the I/O device via the interconnect, and

wherein the I/O device is configured to store the prefetched translation, write pushed by the SMMU, in an address translation cache of the I/O device.

12. The computing device of claim 7 , wherein the I/O device is configured to:

send a translation request comprising the virtual address to the SMMU in response to receiving the DMA stream setup command; and

store the prefetched translation in an address translation cache (ATC) local to the I/O device.

13. The computing device of claim 12 , wherein the I/O device is further configured to:

lookup the prefetched translation of the virtual address to the physical address in the ATC; and

perform a DMA operation with the main memory of the computing device based on the prefetched translation.

14. A non-transitory computer readable medium storing instructions that, when executed by a processor, cause the processor to prime a translation lookaside buffer (TLB) of an input/output memory management unit (IOMMU) by:

sending, by a CPU core of the processor, a DMA stream setup command to an input/output (I/O) device, the DMA stream setup command comprising a virtual address; and

sending, from the CPU core of the processor, a prefetch message comprising the virtual address to the IOMMU to cause the IOMMU to:

prefetch a translation of the virtual address into a corresponding physical address from a main memory;

receive a translation request comprising the virtual address from the input/output device after receiving the prefetch message from the CPU, wherein the IOMMU begins to perform a page walk to prefetch the translation of the virtual address prior to receiving the translation request from the input/output device;

store the translation of the virtual address into the corresponding physical address in the TLB of the IOMMU; and

respond to the translation request from the input/output device with the prefetched translation of the virtual address to the corresponding physical address.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 12, 2022
From: HUGGAHALLI, RAMAKRISHNA; RAINDEL, SHACHAR
To: MICROSOFT TECHNOLOGY LICENSING, LLC
Reel/Frame 060485/0107 →
Continuity (1)
Related Publication 20230401160A1 · Dec 14, 2023