US2016062911A1PendingUtilityA1

Routing direct memory access requests in a virtualized computing environment

Assignee: ADVANCED MICRO DEVICES INCPriority: Aug 27, 2014Filed: Aug 27, 2014Published: Mar 3, 2016
Est. expiryAug 27, 2034(~8.1 yrs left)· nominal 20-yr term from priority
G06F 12/1009G06F 2212/657G06F 12/02G06F 2212/65G06F 12/1081G06F 2212/2532G06F 13/28G06F 2212/1016G06F 2212/68G06F 12/1027
55
PatentIndex Score
0
Cited by
0
References
0
Claims

Abstract

A device may receive a direct memory access request that identifies a virtual address. The device may determine whether the virtual address is within a particular range of virtual addresses. The device may selectively perform a first action or a second action based on determining whether the virtual address is within the particular range of virtual addresses. The first action may include causing a first address translation algorithm to be performed to translate the virtual address to a physical address associated with a memory device when the virtual address is not within the particular range of virtual addresses. The second action may include causing a second address translation algorithm to be performed to translate the virtual address to the physical address when the virtual address is within the particular range of virtual addresses. The second address translation algorithm may be different from the first address translation algorithm.

Claims

exact text as granted — not AI-modified
What is claimed is: 
     
         1 . A method, comprising:
 receiving, by a device, a direct memory access request that identifies a virtual address;   determining, by the device, whether the virtual address is within a particular range of virtual addresses; and   selectively performing, by the device, a first action or a second action based on determining whether the virtual address is within the particular range of virtual addresses,
 the first action including:
 causing a first address translation algorithm to be performed to translate the virtual address to a physical address associated with a memory device when the virtual address is not within the particular range of virtual addresses, and 
 
 the second action including:
 causing a second address translation algorithm to be performed to translate the virtual address to the physical address associated with the memory device when the virtual address is within the particular range of virtual addresses,
 the second address translation algorithm being different from the first address translation algorithm. 
 
 
   
     
     
         2 . The method of  claim 1 , where the first address translation algorithm includes an algorithm that utilizes a page table to translate the virtual address to the physical address; and
 where the second address translation algorithm includes a memory relocation algorithm that calculates the physical address by combining a relocation value and an offset value calculated based on the virtual address.   
     
     
         3 . The method of  claim 1 , further comprising:
 determining a base address stored in a memory accessible by the device;   calculating an offset value using the base address and the virtual address; and   where determining whether the virtual address is within the particular range of virtual addresses further comprises:
 determining whether the virtual address is within the particular range of virtual addresses based on the offset value. 
   
     
     
         4 . The method of  claim 3 , where calculating the offset value further comprises:
 calculating the offset value by determining a difference between the base address and the virtual address; and   where determining whether the virtual address is within the particular range of virtual addresses further comprises:
 comparing the offset value to a threshold value; and 
 determining whether the virtual address is within the particular range of virtual addresses based on comparing the offset value to the threshold value. 
   
     
     
         5 . The method of  claim 4 , where the threshold value is a first threshold value; and
 where determining whether the virtual address is within the particular range of virtual addresses further comprises:
 comparing the offset value to a second threshold value,
 the second threshold value being different than the first threshold value; and 
 
 determining whether the virtual address is within the particular range of virtual addresses based on comparing the offset value to the first threshold value and further based on based on comparing the offset value to the second threshold value. 
   
     
     
         6 . The method of  claim 3 , where causing the second address translation algorithm to be performed to translate the virtual address to the physical address further comprises:
 determining a relocation value stored in a memory accessible by the device; and   calculating the physical address by combining the offset value and the relocation value.   
     
     
         7 . The method of  claim 1 , where the second address translation algorithm translates the virtual address to the physical address faster than the first address translation algorithm translates the virtual address to the physical address. 
     
     
         8 . A device, comprising:
 a controller to:
 receive, from a peripheral device, a memory access request that identifies a virtual address value; 
 determine, based on information stored in a memory accessible by the controller, whether the virtual address value is included in a particular range of virtual addresses values; and 
 selectively perform a first action or a second action based on determining whether the virtual address value is included in the particular range of virtual addresses values,
 the first action being performed when the virtual address value is not included in the particular range of virtual address values, and the first action including:
 causing a first address translation algorithm to be performed to translate the virtual address value to a physical address value that identifies a memory location in a memory device, and 
 
 the second action being performed when the virtual address value is included in the particular range of virtual address values, and the second action including:
 causing a second address translation algorithm to be performed to translate the virtual address value to the physical address value, 
  the second address translation algorithm being different from the first address translation algorithm. 
 
 
   
     
     
         9 . The device of  claim 8 , where the controller, when selectively performing the first action, is further to:
 route the memory access request via a first route that includes an input/output memory management unit (IOMMU); and   where the controller, when selectively performing the second action, is further to:
 route the memory access request via a second route that does not include the IOMMU. 
   
     
     
         10 . The device of  claim 8 , where the controller, when selectively performing the first action, is further to:
 route the memory access request via a first route that has a higher average latency to the memory device relative to a second route; and   where the controller, when selectively performing the second action, is further to:
 route the memory access request via the second route that has a lower average latency to the memory device relative to the first route. 
   
     
     
         11 . The device of  claim 8 , where the controller, when determining whether the virtual address value is included in the particular range of virtual addresses values, is further to:
 determine a base address value stored in the memory accessible by the controller;   calculate an offset value based on a difference between the base address value and the virtual address value;   determine that the offset value does not satisfy a threshold value; and   where the controller, when selectively performing the first action, is further to:
 selectively perform the first action based on determining that the offset value does not satisfy the threshold value. 
   
     
     
         12 . The device of  claim 11 , where the controller, when calculating the offset value, is further to:
 calculate the offset value by subtracting the base address value from the virtual address value;   where the controller, when determining that the offset value does not satisfy the threshold value, is further to:
 determine that the offset value is less than zero; and 
   where the controller, when selectively performing the first action, is further to:
 selectively perform the first action based on determining that the offset value is less than zero. 
   
     
     
         13 . The device of  claim 11 , where the controller, when calculating the offset value, is further to:
 calculate the offset value by subtracting the base address value from the virtual address value;   where the controller, when determining that the offset value does not satisfy the threshold value, is further to:
 determine a length value, stored in the memory accessible by the controller, that represents a quantity of virtual address values included in the particular range of virtual address values; 
 determine that the offset value is greater than or equal to the length value; and 
   where the controller, when selectively performing the first action, is further to:
 selectively perform the first action based on determining that the offset value is greater than or equal to the length value. 
   
     
     
         14 . The device of  claim 8 , where the controller, when determining whether the virtual address value is included in the particular range of virtual addresses values, is further to:
 determine a base address value stored in the memory accessible by the controller;   calculate an offset value based on a difference between the base address value and the virtual address value;   determine that the offset value satisfies a first threshold value;   determine that the offset value satisfies a second threshold value that is different from the first threshold value; and   where the controller, when selectively performing the second action, is further to:
 selectively perform the second action based on determining that the offset value satisfies the first threshold value and the second threshold value. 
   
     
     
         15 . A system, comprising:
 one or more devices to:
 receive a memory access request that identifies a virtual address value; 
 determine whether the virtual address value is included in a particular range of virtual addresses values; and 
 selectively perform a first address translation algorithm or a second address translation algorithm, to translate the virtual address value to a physical address value associated with a memory device, based on determining whether the virtual address value is included in the particular range of virtual address values,
 the first address translation algorithm being performed when the virtual address value is not included in the particular range of virtual address values, 
 the second address translation algorithm being performed when the virtual address value is included in the particular range of virtual address values, 
 the second address translation algorithm being different from the first address translation algorithm; and 
 
 routing the memory access request and information that identifies the physical address value toward the memory device based on selectively performing the first address translation algorithm or the second address translation algorithm. 
   
     
     
         16 . The system of  claim 15 , where the one or more devices are further to:
 selectively perform a first action or a second action based on determining whether the virtual address value is included in the particular range of virtual address values,
 the first action including:
 routing the memory access request via a first route, that includes an input/output memory management unit (IOMMU) that performs the first address translation algorithm, when the virtual address value is not included in the particular range of virtual address values, and 
 
 the second action including:
 routing the memory access request via a second route, that does not include the IOMMU, when the virtual address value is included in the particular range of virtual address values. 
 
   
     
     
         17 . The system of  claim 15 , where the one or more devices are further to:
 determine a requested access type identified in the memory access request,
 the requested access type including at least one of:
 read access, or 
 write access; 
 
   determine a permitted access type; and   where the one or more devices, when selectively performing the first address translation algorithm or the second address translation algorithm, are further to:
 selectively perform the first address translation algorithm when the permitted access type indicates that the requested access type is not permitted, or 
 selectively perform the second address translation algorithm when the permitted access type indicates that the requested access type is permitted. 
   
     
     
         18 . The system of  claim 15 , where the one or more devices, when selectively performing the first address translation algorithm, are further to:
 translate the virtual address value to the physical address value using a page table; and   where the one or more devices, when selectively performing the second address translation algorithm, are further to:
 translate the virtual address value to the physical address value using a memory relocation algorithm that calculates the physical address value by combining a relocation value and an offset value calculated based on the virtual address value. 
   
     
     
         19 . The system of  claim 15 , where the particular range of virtual address values is one of a plurality of ranges of virtual address values; and
 where the one or more devices are further to:
 select the particular range of virtual address values from the plurality of ranges of virtual address values. 
   
     
     
         20 . The system of  claim 15 , where the second address translation algorithm translates the virtual address value to the physical address value faster than the first address translation algorithm translates the virtual address value to the physical address value.

Join the waitlist — get patent alerts

Track US2016062911A1 — get alerts on status changes and closely related new filings.

We store only your email — no account needed. See our privacy policy.