# US 10,482,567 B2 · Apparatus and method for intelligent resource provisioning for shadow structures

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

- Number: US 10,482,567 B2
- Document ID: US10482567B2
- Status: Granted
- Kind: B2
- Application number: 16/062,603
- Filed: 2015-12-22
- Published: 2018-12-27
- Granted: 2019-11-19
- Earliest claimed: 2015-12-22
- Assignees: Intel Corporation
- Applicants: Intel Corporation
- Inventors: Zhiyuan Lv; Kun Tian
- Web page: https://patentgrep.com/patent/US10482567B2

## CPC

- G06T 1/20: Processor architectures; Processor configuration, e.g. pipelining
- G06F 12/1009: using page tables, e.g. page table structures
- G06F 12/145: {the protection being virtual, e.g. for virtual blocks or segments before a translation mechanism}
- G06F 13/00: Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units (interface circuits for specific input/output devices G06F3/00 {; multiprogram control therefor G06F9/46}; multiprocessor systems G06F15/16 )
- G06T 1/60: Memory management
- G06T 15/005: {General purpose rendering architectures}
- G06T 15/80: Shading
- G06F 2212/1052: Security improvement
- G06F 2212/302: In image processor or graphics adapter
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

An apparatus and method are described for intelligent resource provisioning for shadow structures. For example, one embodiment of an apparatus comprises: graphics processing unit (GPU) to process graphics commands and responsively render a plurality of image frames in a graphics memory address space; shadow structure management logic to reserve one or more shadow slots in the graphics memory address space in which to store shadow instances of different GPU contexts; and the shadow structure management logic to implement a partial shadowing policy for shadowing GPU contexts in the shadow slots, the partial shadowing policy based on characteristics of pages of the GPU contexts.

## Claims

### Claim 1

A apparatus comprising:
graphics processing unit (GPU) to process graphics commands and responsively render a plurality of image frames in a graphics memory address space;
shadow structure management logic to reserve one or more shadow slots in the graphics memory address space in which to store shadow instances of different GPU contexts; and
the shadow structure management logic to implement a partial shadowing policy for shadowing GPU contexts in the shadow slots, the partial shadowing policy based on characteristics of pages of the GPU contexts.

### Claim 2 (depends on 1)

The apparatus as in claim 1 wherein one characteristic to implement the shadowing policy comprises a level of sensitivity of fields within the pages.

### Claim 3 (depends on 2)

The apparatus as in claim 2 wherein pages which contain guest physical addresses (GPAs) are to be identified as containing sensitive fields and are to be stored in the shadow slots.

### Claim 4 (depends on 3)

The apparatus as in claim 3 wherein for pages which do not contain sensitive fields, GPU page tables are programmed to have GPU addresses mapped to the guest page directly for a first guest context and for pages which contain sensitive fields, the shadow structure management logic is to write-protect those pages and create a shadow copy in a shadow slot.

### Claim 5 (depends on 1)

The apparatus as in claim 1 wherein the shadow structure management logic is to dynamically store a first set of graphics translation table (GTT) entries in a first shadow slot for a first GPU context and to dynamically swap out the first set of GTT entries for a second set of GTT entries in the first shadow slot, the second set of GTT entries associated with a second GPU context.

### Claim 6 (depends on 5)

The apparatus as in claim 5 wherein the first and second contexts are swapped into the first shadow slot responsive to the GPU currently performing operations with respect to the first and second contexts, respectively.

### Claim 7 (depends on 1)

The apparatus as in claim 1 wherein the shadow structure management logic is to allocate and construct shadow pages in a backing store.

### Claim 8 (depends on 7)

The apparatus as in claim 7 wherein upon swapping out the first GPU context from the first shadow slot, the shadow structure management logic is to synchronize any modifications to the first GPU context to the backing store.

### Claim 9 (depends on 1)

The apparatus as in claim 1 wherein the shadow structure management logic is to set write protection for the pages of GPU contexts in the shadow slots.

### Claim 10

A method comprising:
processing graphics commands and responsively rendering a plurality of image frames in a graphics memory address space;
reserving one or more shadow slots in the graphics memory address space in which to store shadow instances of different GPU contexts; and
implementing a partial shadowing policy for shadowing GPU contexts in the shadow slots, the partial shadowing policy based on characteristics of pages of the GPU contexts.

### Claim 11 (depends on 10)

The method as in claim 10 wherein one characteristic to implement the shadowing policy comprises a level of sensitivity of fields within the pages.

### Claim 12 (depends on 11)

The method as in claim 11 wherein pages which contain guest physical addresses (GPAs) are to be identified as containing sensitive fields and are stored in the shadow slots.

### Claim 13 (depends on 12)

The method as in claim 12 wherein for pages which do not contain sensitive fields, GPU page tables are programmed to have GPU addresses mapped to the guest page directly for a first guest context and for pages which contain sensitive fields, wherein those pages are to be write-protected and a shadow copy to be created in a shadow slot.

### Claim 14 (depends on 10)

The method as in claim 10 further comprising:
dynamically storing a first set of graphics translation table (GTT) entries in a first shadow slot for a first GPU context; and
dynamically swapping out the first set of GTT entries for a second set of GTT entries in the first shadow slot, the second set of GTT entries associated with a second GPU context.

### Claim 15 (depends on 14)

The method as in claim 14 wherein the first and second contexts are swapped into the first shadow slot responsive to the GPU currently performing operations with respect to the first and second contexts, respectively.

### Claim 16 (depends on 10)

The method as in claim 10 further comprising:
allocating and constructing shadow pages in a backing store.

### Claim 17 (depends on 16)

The method as in claim 16 wherein upon swapping out the first GPU context from the first shadow slot, the shadow structure management logic is to synchronize any modifications to the first GPU context to the backing store.

### Claim 18 (depends on 10)

The method as in claim 10 wherein the shadow structure management logic is to set write protection for the pages of GPU contexts in the shadow slots.

### Claim 19

A system comprising:
a memory to store data and program code;
a central processing unit (CPU) comprising an instruction cache for caching a portion of the program code and a data cache for caching a portion of the data, the CPU further comprising execution logic to execute at least some of the program code and responsively process at least some of the data, at least a portion of the program code comprising graphics commands;
a graphics processing subsystem to process the graphics commands and responsively render a plurality of image frames, the graphics processing subsystem comprising:
graphics processing unit (GPU) to process graphics commands and responsively render a plurality of image frames in a graphics memory address space;
shadow structure management logic to reserve one or more shadow slots in the graphics memory address space in which to store shadow instances of different GPU contexts; and
the shadow structure management logic to implement a partial shadowing policy for shadowing GPU contexts in the shadow slots, the partial shadowing policy based on characteristics of pages of the GPU contexts.

### Claim 20 (depends on 19)

The system as in claim 19 wherein one characteristic to implement the shadowing policy comprises a level of sensitivity of fields within the pages.
