IP Library Granted Patent US 12,019,560
Granted Patent B2
US 12,019,560 · App. 17/556,431 · Granted Jun 25, 2024

Virtual partitioning a processor-in-memory (“PIM”)

Inventors: Sooraj Puthoor (Austin, TX); Muhammad Amber Hassaan (San Marcos, TX); Ashwin Aji (Santa Clara, CA); Michael L. Chu (Santa Clara, CA); Nuwan Jayasena (Santa Clara, CA)
Assignee: ADVANCED MICRO DEVICES, INC.
G06F12/1072G06F12/0238G06F12/1009G06F12/1054G06F12/1063G06F13/1673G06F2212/7201
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,019,560
App. No.
17/556,431
Granted
Jun 25, 2024
Kind
B2
Abstract

Process isolation for a PIM device includes: receiving, from a process, a call to allocate a virtual address space where the process stores a PIM configuration context; allocating the virtual address space including mapping a physical address space including PIM device configuration registers to the virtual address space only if the physical address space is not mapped to another process's virtual address space; and programming the PIM device configuration space according to the configuration context. When a PIM command is executed, a translation mechanism determines whether there is a valid mapping of a virtual address of the PIM command to a physical address of a PIM resource, such as a LIS entry. If a valid mapping exists, the translation is completed and the resource is accessed, but if there is not a valid mapping, the translation fails and the process is blocked from accessing the PIM resource.

Claims (47)

1. An apparatus comprising:

one or more processing cores and computer memory, wherein the computer memory comprises computer program instructions that, when executed, cause the apparatus to:

map a physical address space of a configuration space of a processing-in-memory (PIM) device to a virtual address space associated with a process only if the physical address space is not mapped to another process's virtual address space, wherein the virtual address space associated with the process includes a PIM configuration context; and

program the configuration space of the PIM device with data of the PIM configuration context.

2. The apparatus of claim 1 , wherein:

the PIM configuration context includes a virtual instruction store comprising a plurality of entries, with each entry including a PIM instruction opcode;

the virtual instruction store is mapped to a local instruction store utilized by the PIM device; and

the computer memory further comprises computer program instructions that, when executed, cause the apparatus to:

responsive to receiving a PIM command that includes a virtual address indexing an entry in the virtual instruction store, translate the virtual address to a physical address indexing an entry of the local instruction store; and

retrieve, from the entry of the local instruction store, the PIM instruction opcode.

3. The apparatus of claim 2 , wherein the computer memory further comprises computer program instructions that, when executed, cause the apparatus to translate the virtual address only if a valid mapping of the virtual address exists.

4. The apparatus of claim 1 , wherein mapping the physical address space of the configuration space to the virtual address space comprises mapping memory buffers on which PIM instructions operate to one or more memory pages assigned to the process, and the computer memory further comprises computer program instructions that, when executed, cause the apparatus to:

receive, from the process, a PIM command targeting a virtual memory address of a memory buffer; and

translate the virtual memory address to a physical address of one of the memory buffers only if the physical address is included in one of the memory pages assigned to the process.

5. The apparatus of claim 1 , wherein the computer memory further comprises computer program instructions that, when executed, cause the apparatus to:

map, while the virtual address space is allocated to the process, a second physical address space of a second configuration space of a second PIM device to a second virtual address space associated with a second process only if the second physical address space is not mapped to another process's virtual address space, wherein the second virtual address space includes a second PIM configuration context; and

program the second configuration space with data of the second PIM configuration context.

6. The apparatus of claim 5 , wherein mapping the second physical address space of the second configuration space to the second virtual address space comprises mapping second memory buffers on which PIM instructions operate to one or more second memory pages assigned to the second process, and the computer memory further comprises computer program instructions that, when executed, cause the apparatus to:

receive, from the second process, a second PIM command targeting a second virtual memory address of a second memory buffer; and

translate the second virtual memory address to a physical address of one of the second memory buffers only if the physical address is included in one of the second memory pages assigned to the second process.

7. The apparatus of claim 1 , wherein the computer program instructions comprise a driver.

8. The apparatus of claim 1 , wherein the computer program instructions comprise an operating system.

9. The apparatus of claim 1 , wherein the PIM device comprises a component of the apparatus.

10. The apparatus of claim 1 , wherein the PIM device comprises a component separate from the apparatus.

11. A method comprising:

mapping a physical address space of a configuration space of a processing-in-memory (PIM) device to a virtual address space associated with a process only if the physical address space is not mapped to another process's virtual address space, wherein the virtual address space associated with the process includes a PIM configuration context; and

programming the configuration space of the PIM device with data of the PIM configuration context.

12. The method of claim 11 , wherein:

the PIM configuration context includes a virtual instruction store comprising a plurality of entries, with each entry including a PIM instruction opcode;

the virtual instruction store is mapped to a local instruction store utilized by the PIM device; and

the method further comprises:

responsive to receiving a PIM command that includes a virtual address indexing an entry in the virtual instruction store, translating the virtual address to a physical address indexing an entry of the local instruction store; and

retrieving, from the entry of the local instruction store, a PIM instruction opcode.

13. The method of claim 12 , further comprising:

translating the virtual address to the physical address only if a valid mapping of the virtual address exists.

14. The method of claim 11 , wherein mapping the physical address space of the configuration space to the virtual address space comprises mapping memory buffers on which PIM instructions operate to one or more memory pages assigned to the process, and the method further comprises:

receiving, from the process, a PIM command targeting a virtual memory address of a memory buffer; and

translating the virtual memory address to a physical address of one of the memory buffers only if the physical address is included in one of the memory pages assigned to the process.

15. The method of claim 11 , further comprising:

mapping, while the virtual address space is allocated to the process, a second physical address space of a second configuration space of a second PIM device to a second virtual address space associated with a second process only if the second physical address space is not mapped to another process's virtual address space, wherein the second virtual address space includes a second PIM configuration context; and

programming the second configuration space with data of the second PIM configuration context.

16. The method of claim 15 , wherein mapping the second physical address space of the configuration space to the second virtual address space further comprises mapping second memory buffers on which PIM instructions operate to one or more second memory pages assigned to the second process, and the method further comprises:

receiving, from the second process, a second PIM command targeting a second virtual memory address of one of the second memory buffers; and

translating the second virtual memory address to a physical address of one of the second memory buffers only if the physical address is included in one of the second memory pages assigned to the second process.

17. The method of claim 11 , wherein mapping the physical address space of the configuration space to the virtual address space is carried out by a driver of the PIM device.

18. The method of claim 11 , wherein mapping the physical address space of the configuration space to the virtual address space is carried out by a hypervisor.

19. The method of claim 11 , wherein mapping the physical address space of the configuration space to the virtual address space is carried out by an operating system.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 4, 2022
From: PUTHOOR, SOORAJ; HASSAAN, MUHAMMAD AMBER; AJI, ASHWIN; CHU, MICHAEL L.; JAYASENA, NUWAN
To: ADVANCED MICRO DEVICES, INC.
Reel/Frame 058885/0251 →
Continuity (1)
Related Publication 20230195645A1 · Jun 22, 2023