# US 2019/0102321 A1 · Techniques to provide access protection to shared virtual memory

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

- Number: US 2019/0102321 A1
- Document ID: US20190102321A1
- Status: Published application
- Kind: A1
- Application number: 15/719,977
- Filed: 2017-09-29
- Published: 2019-04-04
- Earliest claimed: 2017-09-29
- Assignees: Intel Corporation
- Applicants: Intel Corporation
- Inventors: ANNA TRIKALINOU
- Web page: https://patentgrep.com/patent/US20190102321A1

## CPC

- G06F 12/145: {the protection being virtual, e.g. for virtual blocks or segments before a translation mechanism}
- G06F 12/1009: using page tables, e.g. page table structures
- G06F 12/1027: using associative or pseudo-associative address translation means, e.g. translation look-aside buffer [TLB]
- G06F 12/1081: for peripheral access to main memory, e.g. direct memory access [DMA]
- G06F 2212/1052: Security improvement
- G06F 2212/65: Details of virtual memory and virtual address translation
- G06F 2212/656: Address space sharing
- G06F 2212/68: Details of translation look-aside buffer [TLB]
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Various embodiments are generally directed to techniques for shared virtual memory (SVM) access protection, such as by performing a security check whenever a write request arrives from an SVM device, for instance. Some embodiments are particularly directed to an input/output memory management unit (IOMMU) that prevents an SVM device from modifying a code page with a memory transaction request by generating an access request fault and/or a translation completion with read-only access in response to the memory transaction request.

## Claims

### Claim 1

An apparatus for control flow protection, the apparatus comprising:
a memory; and
logic for an input/output memory management unit (IOMMU), at least a portion of the logic implemented in circuitry coupled to the memory, the logic to:
receive a memory access request from a shared virtual memory (SVM) device, the memory access request comprising a type of a plurality of types of memory access requests;
identify a translation entry associated with the memory access request in a cache, the translation entry comprising a permission set;
perform the memory access request when the permission set allows the type of the memory access request; and
generate an access request fault when the permission set restricts the type of the memory access request.

### Claim 2 (depends on 1)

The apparatus of claim 1, each permission in the permission set to allow or restrict a type of the plurality of types of memory access requests.

### Claim 3 (depends on 1)

The apparatus of claim 1, the set of permissions comprising one or more of a read permission, a write permission, and an execute permission.

### Claim 4 (depends on 1)

The apparatus of claim 1, the IOMMU comprising the cache.

### Claim 5 (depends on 1)

The apparatus of claim 1, the cache comprising a translation lookaside buffer (TLB).

### Claim 6 (depends on 1)

The apparatus of claim 1, the translation entry comprising a set of bits and each permission in the permission set comprising a subset of the set of bits.

### Claim 7 (depends on 1)

The apparatus of claim 1, comprising one or more registers, contents of the one or more registers to activate the logic.

### Claim 8 (depends on 1)

The apparatus of claim 1, the SVM device comprising one or more of a hardware accelerator, a graphics processing unit (GPU), a field programmable gate array (FPGA), a system on chip (SOC), a speech processing unit (SPU), an input/output (I/O) device, a digital signal processor (DSP), or an application-specific integrated circuit (ASIC).

### Claim 9 (depends on 1)

The apparatus of claim 1, the memory access request comprising a virtual address.

### Claim 10 (depends on 9)

The apparatus of claim 9, the logic to identify the translation entry associated with the memory access request in the cache based on the virtual address.

### Claim 11 (depends on 1)

The apparatus of claim 1, the logic to signal an exception handler of the access request fault when the permission set restricts the type of the memory access request.

### Claim 12 (depends on 11)

The apparatus of claim 11, the exception handler comprised in an operating system (OS), the exception handler to terminate the memory access request.

### Claim 13

At least one non-transitory computer-readable medium comprising a set of instructions that, in response to being executed by a processor circuit, cause the processor circuit to:
receive a memory transaction request from a shared virtual memory (SVM) device at an input/output memory management unit (IOMMU), the memory transaction request comprising an address associated with a memory page in an SVM utilized by the SVM device;
determine the memory transaction request includes a translation request and is associated with a write request;
identify whether the memory page associated with the memory transaction request is executable;
generate a translation completion with read and write access when the memory page associated with the memory transaction request is not executable; and
generate a translation completion with read-only access when the memory page associated with the memory transaction request is executable.

### Claim 14 (depends on 13)

The at least one non-transitory computer-readable medium of claim 13, the IOMMU comprising an IOMMU cache with at least one translation entry associated with a previous memory transaction between the IOMMU and the SVM device.

### Claim 15 (depends on 16)

The at least one non-transitory computer-readable medium of claim 16, comprising instructions that, in response to being executed by the processor circuit, cause the processor circuit to identify whether the memory page associated with the memory transaction request is executable based on the IOMMU cache.

### Claim 16 (depends on 13)

The at least one non-transitory computer-readable medium of claim 13, comprising instructions that, in response to being executed by the processor circuit, cause the processor circuit to identify whether the memory page associated with the memory transaction request is executable based on one or more page table walks.

### Claim 17 (depends on 13)

The at least one non-transitory computer-readable medium of claim 13, comprising the SVM device, the SVM device comprising a device cache with at least one translation entry associated with a previous memory transaction between the IOMMU and the SVM device.

### Claim 18 (depends on 13)

The at least one non-transitory computer-readable medium of claim 13, the memory transaction request comprising an address type field to indicate whether the address associated with the memory page in the SVM is translated or untranslated.

### Claim 19 (depends on 18)

The at least one non-transitory computer-readable medium of claim 18, the memory transaction request comprising a header that includes the address type field.

### Claim 20 (depends on 13)

The at least one non-transitory computer-readable medium of claim 13, comprising one or more registers, contents of the one or more registers to activate the logic.

### Claim 21 (depends on 13)

The at least one non-transitory computer-readable medium of claim 13, comprising a central processing unit (CPU), the CPU and the SVM device to utilize the SVM.

### Claim 22 (depends on 13)

The at least one non-transitory computer-readable medium of claim 13, the SVM device comprising one or more of a hardware accelerator, a graphics processing unit (GPU), a field programmable gate array (FPGA), a system on chip (SOC), a speech processing unit (SPU), an input/output (I/O) device, a digital signal processor (DSP), or an application-specific integrated circuit (ASIC).

### Claim 23

A computer-implemented method, comprising:
receiving a memory transaction request from a shared virtual memory (SVM) device at an input/output memory management unit (IOMMU), the memory transaction request comprising an address associated with a memory page in an SVM utilized by the SVM device;
determining the memory transaction request includes a translation request and is associated with a write request;
identifying whether the memory page associated with the memory transaction request is executable;
generating a translation completion with read and write access when the memory page associated with the memory transaction request is not executable; and
generating a translation completion with read-only access when the memory page associated with the memory transaction request is executable.

### Claim 24 (depends on 23)

The computer-implemented method of claim 23, comprising sending the translation completion with read and write access to the SVM device when the memory page associated with the memory transaction request is not executable.

### Claim 25 (depends on 23)

The computer-implemented method of claim 23, comprising sending the translation completion with read-only access to the SVM device when the memory page associated with the memory transaction request is executable.
