# US 11,030,117 B2 · Protecting host memory from access by untrusted accelerators

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 11,030,117 B2
- Document ID: US11030117B2
- Status: Granted
- Kind: B2
- Application number: 15/650,252
- Filed: 2017-07-14
- Published: 2019-01-17
- Granted: 2021-06-08
- Earliest claimed: 2017-07-14
- Assignees: Advanced Micro Devices, Inc.
- Applicants: Advanced Micro Devices, Inc.
- Inventors: Nuwan Jayasena; Brandon K. Potter; Andrew G. Kegel
- Web page: https://patentgrep.com/patent/US11030117B2

## CPC

- G06F 12/1408: {by using cryptography (for digital transmission H04L9/00)}
- G06F 9/45558: {Hypervisor-specific management and integration aspects}
- G06F 9/4856: {resumption being on a different machine, e.g. task migration, virtual machine migration (G06F9/5088 takes precedence)}
- G06F 9/5077: {Logical partitioning of resources; Management or configuration of virtualized resources (specific details on emulation or internal functioning of virtual machines G06F9/455)}
- G06F 12/0875: with dedicated cache, e.g. instruction or stack
- G06F 12/10: Address translation
- G06F 12/1036: for multiple virtual address spaces, e.g. segmentation (G06F12/1045 takes precedence)
- G06F 12/1081: for peripheral access to main memory, e.g. direct memory access [DMA]
- G06F 12/1441: {for a range}
- G06F 12/1491: {in a hierarchical protection system, e.g. privilege levels, memory rings}
- G06F 2009/45587: {Isolation or security of virtual machine instances}
- G06F 2212/1024: Latency reduction
- G06F 2212/1052: Security improvement
- G06F 2212/301: In special purpose processing node, e.g. vector processor
- G06F 2212/656: Address space sharing
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A host processor receives an address translation request from an accelerator, which may be trusted or un-trusted. The address translation request includes a virtual address in a virtual address space that is shared by the host processor and the accelerator. The host processor encrypts a physical address in a host memory indicated by the virtual address in response to the accelerator being permitted to access the physical address. The host processor then provides the encrypted physical address to the accelerator. The accelerator provides memory access requests including the encrypted physical address to the host processor, which decrypts the physical address and selectively accesses a location in the host memory indicated by the decrypted physical address depending upon whether the accelerator is permitted to access the location indicated by the decrypted physical address.

## Claims

### Claim 1

A method comprising:
receiving, at a host processor from an accelerator, an address translation request including a virtual address in a virtual address space that is shared by the host processor and the accelerator;
encrypting, at the host processor, a physical address in a host memory indicated by the virtual address in response to the accelerator being permitted to access the physical address;
providing, from the host processor to the accelerator, the encrypted physical address; and
storing, at a translation lookaside buffer associated with the accelerator, a mapping of the virtual address to the encrypted physical address.

### Claim 2 (depends on 1)

The method of claim 1, wherein encrypting the physical address comprises encrypting the physical address on the basis of a secret key that is known by the host processor and not known by the accelerator.

### Claim 3 (depends on 2)

The method of claim 2, further comprising:
receiving, at the host processor and from the accelerator, a memory access request including the encrypted physical address;
decrypting the encrypted physical address using the secret key to form a decrypted physical address; and
selectively accessing a location in the host memory indicated by the decrypted physical address depending upon whether the accelerator is permitted to access the location indicated by the decrypted physical address.

### Claim 4 (depends on 3)

The method of claim 3, further comprising:
computing a first checksum based on the physical address; and
appending the first checksum to the physical address prior to encrypting the physical address and the first checksum.

### Claim 5 (depends on 4)

The method of claim 4, wherein selectively accessing the location in the host memory comprises:
computing a second checksum based on the decrypted physical address; and
accessing the location in the host memory in response to the second checksum being the same as a third checksum included in the decrypted physical address.

### Claim 6 (depends on 4)

The method of claim 4, further comprising:
accessing first metadata indicating permissions associated with the accelerator; and
appending the first metadata to the physical address prior to encrypting the physical address and the first metadata.

### Claim 7 (depends on 6)

The method of claim 6, wherein selectively accessing the location in the host memory comprises accessing the location in the host memory in response to second metadata in the decrypted physical address indicating that the accelerator is permitted to access the location indicated by the decrypted physical address.

### Claim 8 (depends on 1)

The method of claim 1, further comprising:
providing, from the host processor to the accelerator, at least one of a translation lookaside buffer invalidation request including the encrypted physical address or a cache probe including the encrypted physical address.

### Claim 9

A method comprising:
providing, from an accelerator to a host processor, an address translation request including a virtual address in a virtual address space that is shared by the host processor and the accelerator;
receiving, at the accelerator, an encrypted physical address in a host memory indicated by the virtual address in response to the accelerator being permitted to access the encrypted physical address; and
storing, at a translation lookaside buffer associated with the accelerator, a mapping of the virtual address to the encrypted physical address.

### Claim 10 (depends on 9)

The method of claim 9, further comprising:
providing, from the accelerator to the host processor, a memory access request including the encrypted physical address; and
selectively receiving access to a location in the host memory indicated by the encrypted physical address depending upon whether the host processor determines that the accelerator is permitted to access the location indicated by the encrypted physical address.

### Claim 11 (depends on 9)

The method of claim 9, further comprising:
receiving, at the accelerator from the host processor, at least one of a translation lookaside buffer invalidation request including the encrypted physical address or a cache probe including the encrypted physical address.

### Claim 12

An apparatus comprising:
a host processor;
a host memory that is configured to be mapped to a virtual address space that is shared by the host processor and an accelerator, wherein the host processor is configured to:
receive an address translation request including a virtual address in the virtual address space,
encrypt a physical address in the host memory indicated by the virtual address in response to the accelerator being permitted to access the physical address, and
provide the encrypted physical address to the accelerator; and
a translation lookaside buffer associated with the accelerator and configured to store a mapping of the virtual address to the encrypted physical address.

### Claim 13 (depends on 12)

The apparatus of claim 12, wherein the host processor is configured to:
encrypt the physical address on the basis of a secret key that is known by the host processor and not known by the accelerator.

### Claim 14 (depends on 13)

The apparatus of claim 13, wherein the host processor is further configured to:
receive a memory access request including the encrypted physical address,
decrypt the encrypted physical address using the secret key to form a decrypted physical address, and
selectively access a location in the host memory indicated by the decrypted physical address depending upon whether the accelerator is permitted to access the location indicated by the decrypted physical address.

### Claim 15 (depends on 14)

The apparatus of claim 14, wherein the host processor is configured to:
compute a first checksum based on the physical address and append the first checksum to the physical address prior to encrypting the physical address and the first checksum.

### Claim 16 (depends on 15)

The apparatus of claim 15, wherein the host processor is configured to:
compute a second checksum based on the decrypted physical address and access the location in the host memory in response to the second checksum being the same as a third checksum included in the decrypted physical address.

### Claim 17 (depends on 14)

The apparatus of claim 14, wherein the host processor is configured to:
access first metadata indicating permissions associated with the accelerator and append the first metadata to the physical address prior to encrypting the physical address and the first metadata.

### Claim 18 (depends on 17)

The apparatus of claim 17, wherein the host processor is configured to:
access the location in the host memory in response to second metadata in the decrypted physical address indicating that the accelerator is permitted to access the location indicated by the decrypted physical address.

### Claim 19 (depends on 12)

The apparatus of claim 12, further comprising:
the accelerator, wherein the accelerator is configured to store a mapping of the virtual address to the encrypted physical address.

### Claim 20 (depends on 19)

The apparatus of claim 19, wherein the host processor is configured to:
provide at least one of a translation lookaside buffer invalidation request including the encrypted physical address or a cache probe including the encrypted physical address.
