# US 2017/0286326 A1 · Memory protection at a thread level for a memory protection key architecture

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

- Number: US 2017/0286326 A1
- Document ID: US20170286326A1
- Status: Published application
- Kind: A1
- Application number: 15/088,836
- Filed: 2016-04-01
- Published: 2017-10-05
- Earliest claimed: 2016-04-01
- Assignees: Intel Corporation
- Applicants: Intel Corporation
- Inventors: Francesc Bernat Guim; David A. Koufaty; Andrea Pellegrini; Rajesh M. Sankaran
- Web page: https://patentgrep.com/patent/US20170286326A1

## CPC

- G06F 12/1475: {in a virtual system, e.g. with translation means}
- G06F 12/1009: using page tables, e.g. page table structures
- G06F 12/1081: for peripheral access to main memory, e.g. direct memory access [DMA]
- G06F 21/6209: {to a single file or object, e.g. in a secure envelope, encrypted and accessed using a key, or with access control rules appended to the object itself}
- G06F 21/79: in semiconductor storage media, e.g. directly-addressable memories
- G06F 2212/1052: Security improvement
- G06F 2212/152: Virtualized environment, e.g. logically partitioned system
- G06F 2212/656: Address space sharing
- G06F 2212/657: Virtual address space management
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A processing system includes a processing core to execute a task and an input output (IO) memory management unit, coupled to the core. The IO memory management unit includes a storage unit to store a page table entry including an identifier of a memory domain and a protection key associated with the identifier. The protection key indicates whether a memory page in the memory domain is accessible. The IO memory management unit also includes a protection key register comprising a field indexed by the protection key, the field including a set of bits reflecting a memory access permission associated with the protection key. The protection key register is, responsive to receiving a request from an IO device to store data associated with the process or the thread of the process, to one of allow or deny permission to access the memory page in the memory domain for storage of the data associated with the process or the thread of the process based on the protection key.

## Claims

### Claim 1

A processing device comprising:
a processing core to execute a thread of a process; and
an input output (IO) memory management unit (IOMMU) communicably coupled to the processing core, wherein the IOMMU comprising:
a storage unit to store a page table entry comprising an identifier of a memory domain and a protection key associated with the identifier, the protection key indicating whether a memory page in the memory domain is accessible, wherein the page table entry to translate a virtual address to a physical address; and
a protection key register comprising a field indexed by the protection key, the field comprising a set of bits reflecting a memory access permission associated with the protection key, wherein the protection key register is, responsive to receiving a request from an IO device to store data associated with a process or a thread of the process, to one of allow or deny permission to access the memory page in the memory domain for storage of the data based on the memory access permission associated with the protection key in the page table entry.

### Claim 2 (depends on 1)

The processing device of claim 1, wherein the storage unit stores a plurality of other page table entries, and wherein each of the other page table entries comprises another identifier of another memory domain and another protection key associated with the another identifier.

### Claim 3 (depends on 2)

The processing device of claim 2, wherein the protection key register comprises a plurality of fields, wherein each of the plurality of fields is indexed by one of the protection keys associated with the memory access permission.

### Claim 4 (depends on 1)

The processing device of claim 1, wherein the process comprises a plurality of threads.

### Claim 5 (depends on 1)

The processing device of claim 1, wherein the request comprises a process access system identification (PASID) associated with the thread, the PASID identifying the memory page residing in the memory domain to access for storage of the data associated with the process or the thread of the process.

### Claim 6 (depends on 1)

The processing device of claim 1, wherein a value is assigned to the protection key.

### Claim 7 (depends on 5)

The processing device of claim 5 wherein the value is assigned based on a policy set by one of an operating system or an application.

### Claim 8 (depends on 7)

The processing device of claim 7, wherein the protection key register is to one of allow or deny access to the memory page in the memory domain to store the data associated with the process or the thread of the process based on the value assigned to the protection key.

### Claim 9 (depends on 8)

The processing device of claim 8 wherein the protection key register to generate a memory fault signal in response to the deny access to the memory page in the memory domain, wherein the memory fault signal comprise the PASID identifying a memory address associated with the memory page and the process or the thread of the process.

### Claim 10

A system-on-a chip (SoC) comprising:
a memory; and
a processor, communicatively coupled to the memory, comprising a processing core to execute a thread of the process and an input output (IO) memory management unit (IOMMU) comprising a storage unit to store a page table entry comprising an identifier of a memory domain and a protection key associated with the identifier, the protection key indicating whether a memory page in the memory domain is accessible, wherein the page table entry to translate a virtual address to a physical address; and
an input output (IO) device comprising:
a protection key register comprising a field indexed by the protection key, the field comprising a set of bits reflecting a memory access permission associated with the protection key, wherein the protection key register is, responsive to receiving a request from an IO device to store data associated with a process or the thread of the process, to one of allow or deny permission to access the memory page in the memory domain for storage of the data associated with the process or the thread of the process based on the protection key.

### Claim 11 (depends on 10)

The SoC of claim 10, wherein the request comprise a process access system identification (PASID) associated with the thread, the PASID identifying the memory page residing in the memory domain to access for storage of the data associated with the process or the thread of the process.

### Claim 12 (depends on 10)

The SoC of claim 10, wherein the processing core to generate a command sending the protection key to the protection key register in the IO device.

### Claim 13 (depends on 11)

The SoC of claim 11, wherein a value is assigned to the protection key.

### Claim 14 (depends on 13)

The SoC of claim 13, wherein the protection key register to one of allow or deny access to the memory page in the memory domain to store the data associated with the process or the thread of the process based on the value.

### Claim 15 (depends on 14)

The SoC of claim 14 wherein the protection key register to generate a memory fault signal in response to the deny access to the memory page in the memory domain, wherein the memory fault signal comprise the PASID identifying a memory address associated with the memory page and the process or the thread of the process.

### Claim 16

A system comprising:
a memory; and
a processor, communicatively coupled to the memory, comprising a processing core to execute a thread of a process and a storage unit to store a page table entry comprising an identifier of a memory domain and a protection key associated with the identifier indicating whether a memory page in the memory domain is accessible, wherein the page table entry to translate a virtual address to a physical address; and
an input output (IO) device comprising an IO memory management unit comprising:
a protection key register comprising a field indexed by the protection key, the field comprising a set of bits reflecting a memory access permission associated with the protection key, wherein the protection key register is, responsive to receiving a request from an IO device to store data associated with a process or a thread of the process, to one of allow or deny permission to access the memory page in the memory domain for storage of the data associated with the process or the thread of the process based on the protection key.

### Claim 17 (depends on 16)

The system of claim 16, wherein the request comprise a process access system identification (PASID) associated with the thread, the PASID identifying the memory page residing in the memory domain to access for storage of the data associated with a process or the thread of the process.

### Claim 18 (depends on 16)

The system of claim 16, wherein the processing core to generate a command sending the protection key to the IO memory management unit.

### Claim 19 (depends on 16)

The system of claim 16, wherein a value is assigned to the protection key.

### Claim 20 (depends on 19)

The system of claim 19, wherein the protection key register to one of allow or deny access to the memory page in the memory domain to store the data associated with the process or the thread of the process based on the value.

### Claim 21

A method comprising:
receiving a request from an input/output (I/O) device to access a memory page in a memory domain to store data associated with a process or a thread of a process,
identifying a protection key associated with an identifier of the memory domain, wherein the protection key indicates whether the memory page in the memory domain is accessible, and wherein a page table entry maintains an association between the protection key and the identifier of the memory domain, the page table entry to translate a virtual address to a physical address; and
generating one of allow or deny permission to access the memory page in the memory domain for storage of the data associated with the process or the thread of the process based on the identified protection key.

### Claim 22 (depends on 21)

The method of claim 21, wherein the request comprise a process access system identification (PASID) associated with the thread, the PASID identifying the memory page residing in the memory domain for storage of the data associated with the process or the thread of the process.

### Claim 23 (depends on 22)

The method of claim 22, wherein a value is assigned to the identified protection key.

### Claim 24 (depends on 23)

The method of claim 23, wherein generating the one of allow or deny access to the memory page in the memory domain for storage of the data associated with the process or the thread of the process is based on the value.

### Claim 25 (depends on 21)

The method of claim 21 further comprising generating a memory fault signal in response to the deny access to the memory page in the memory domain, wherein the memory fault signal comprise the PASID identifying a memory address associated with the memory page and the process or the thread of the process.
