# US 2019/0056964 A1 · Methods, systems and apparatus for supporting wide and efficient front-end operation with guest-architecture emulation

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

- Number: US 2019/0056964 A1
- Document ID: US20190056964A1
- Status: Published application
- Kind: A1
- Application number: 16/166,010
- Filed: 2018-10-19
- Published: 2019-02-21
- Earliest claimed: 2013-03-15
- Assignees: Intel Corporation
- Applicants: Intel Corporation
- Inventors: Mohammad Abdallah; Ankur Groen; Erika Gunadi; Mandeep Singh; Ravishankar Rao
- Web page: https://patentgrep.com/patent/US20190056964A1

## CPC

- G06F 9/45545: {Guest-host, i.e. hypervisor is an application program itself, e.g. VirtualBox}
- G06F 9/30058: {Conditional branch instructions}
- G06F 9/30065: {Loop control instructions; iterative instructions, e.g. LOOP, REPEAT}
- G06F 9/30174: {for non-native instruction set, e.g. Javabyte, legacy code}
- G06F 9/323: {for indirect branch instructions}
- G06F 9/325: {for loops, e.g. loop detection or loop counter}
- G06F 9/3806: {using address prediction, e.g. return stack, branch history buffer}
- G06F 9/45554: {Instruction set architectures of guest OS and hypervisor or native processor differ, e.g. Bochs or VirtualPC on PowerPC MacOS}
- G06F 12/0875: with dedicated cache, e.g. instruction or stack
- G06F 12/1027: using associative or pseudo-associative address translation means, e.g. translation look-aside buffer [TLB]
- G06F 12/1036: for multiple virtual address spaces, e.g. segmentation (G06F12/1045 takes precedence)
- G06F 12/109: for multiple virtual address spaces, e.g. segmentation (G06F12/1036 takes precedence)
- G06F 9/3808: {for instruction reuse, e.g. trace cache, branch target cache}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Methods for supporting wide and efficient front-end operation with guest architecture emulation are disclosed. As a part of a method for supporting wide and efficient front-end operation, upon receiving a request to fetch a first far taken branch instruction, a cache line that includes the first far taken branch instruction, a next cache line and a cache line located at the target of the first far taken branch instruction is read. Based on information that is accessed from a data table, the cache line and either the next cache line or the cache line located at the target is fetched in a single cycle.

## Claims

### Claim 1

A processor, comprising:
a cache system, comprising:
a cache controller to:
fetch, a first cache line that includes a branch instruction and, based on information in a data table, either a second cache line that is adjacent to the first cache line in the instruction cache or a target cache line that is stored at a target address of the branch instruction,
wherein the information is populated in the data table upon moving the first cache line from an L2 cache to an L1 cache.

### Claim 2 (depends on 1)

The processor of claim 1, wherein the cache controller is to copy the target cache line to a shadow cache and the target cache line is fetched from the shadow cache.

### Claim 3 (depends on 2)

The processor of claim 2, wherein the target cache line is stored in a same index of the shadow cache as is the first cache line in the instruction cache.

### Claim 4 (depends on 2)

The processor of claim 2, wherein the shadow cache has a same number of sets and half a number of ways as the instruction cache.

### Claim 5 (depends on 1)

The processor of claim 1, wherein the controller is to determine an offset of a target instruction in the target cache line relative to the branch instruction, compute a guest target based on said offset of said target instruction and a guest instruction pointer, and determine whether said guest target and a cached native target are valid based on a reference to a conversion-lookaside-buffer.

### Claim 6 (depends on 1)

The processor of claim 1, wherein the controller to select a predicted guest target from a guest target cache that stores guest targets and determine whether the predicted guest target is valid based on a reference to a conversion-lookaside-buffer.

### Claim 7 (depends on 1)

The processor of claim 1, wherein the information includes one or more of a branch instruction address of the branch instruction, an offset associated with the target cache line, a direct/indirect branch instruction identifier, and a native/guest branch instruction identifier.

### Claim 8

A cache system, comprising:
a cache controller to:
fetch, a first cache line that includes a branch instruction and, based on information in a data table, either a second cache line that is adjacent to the first cache line in the instruction cache or a target cache line that is stored at a target address of the branch instruction,
wherein the information is populated in the data table upon moving the first cache line from an L2 cache to an L1 cache.

### Claim 9 (depends on 8)

The cache system of claim 8, wherein the cache controller is to copy the target cache line to a shadow cache and the target cache line is fetched from the shadow cache.

### Claim 10 (depends on 9)

The cache system of claim 9, wherein the target cache line is stored in a same index of the shadow cache as is the first cache line in the instruction cache.

### Claim 11 (depends on 9)

The cache system of claim 9, wherein the shadow cache has a same number of sets and half a number of ways as the instruction cache.

### Claim 12 (depends on 8)

The cache system of claim 8, wherein the controller is to determine an offset of a target instruction in the target cache line relative to the branch instruction, compute a guest target based on said offset of said target instruction and a guest instruction pointer, and determine whether said guest target and a cached native target are valid based on a reference to a conversion-lookaside-buffer.

### Claim 13 (depends on 8)

The cache system of claim 8, wherein the controller to select a predicted guest target from a guest target cache that stores guest targets and determine whether the predicted guest target is valid based on a reference to a conversion-lookaside-buffer.

### Claim 14 (depends on 8)

The cache system of claim 8, wherein the information includes one or more of a branch instruction address of the branch instruction, an offset associated with the target cache line, a direct/indirect branch instruction identifier, and a native/guest branch instruction identifier.

### Claim 15

A non-transitory machine-readable storage medium that stores instructions, which when executed by a processor, causes the processor to:
fetch, a first cache line that includes a branch instruction and, based on information in a data table, either a second cache line that is adjacent to the first cache line in an instruction cache or a target cache line that is stored at a target address of the branch instruction,
wherein the information is populated in the data table upon moving the first cache line from an L2 cache to an L1 cache.

### Claim 16 (depends on 15)

The non-transitory machine-readable storage medium of claim 15, wherein the instructions further cause the processor to:
copy the target cache line to a shadow cache and the target cache line is fetched from the shadow cache.

### Claim 17 (depends on 16)

The non-transitory machine-readable storage medium of claim 16, wherein the target cache line is stored in a same index of the shadow cache as is the first cache line in the instruction cache.

### Claim 18 (depends on 16)

The non-transitory machine-readable storage medium of claim 16, wherein the shadow cache has a same number of sets and half a number of ways as the instruction cache.

### Claim 19 (depends on 15)

The non-transitory machine-readable storage medium of claim 15, wherein the controller is to determine an offset of a target instruction in the target cache line relative to the branch instruction, compute a guest target based on said offset of said target instruction and a guest instruction pointer, and determine whether said guest target and a cached native target are valid based on a reference to a conversion-lookaside-buffer.

### Claim 20 (depends on 15)

The non-transitory machine-readable storage medium of claim 15, wherein the information includes one or more of a branch instruction address of the branch instruction, an offset associated with the target cache line, a direct/indirect branch instruction identifier, and a native/guest branch instruction identifier.
