# US 2022/0027460 A1 · Microprocessor core with a store dependence predictor accessed using a translation context

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

- Number: US 2022/0027460 A1
- Document ID: US20220027460A1
- Status: Published application
- Kind: A1
- Application number: 17/185,802
- Filed: 2021-02-25
- Published: 2022-01-27
- Earliest claimed: 2020-07-23
- Assignees: Ventana Micro Systems Inc.
- Applicants: Ventana Micro Systems Inc.
- Inventors: John G. Favor
- Web page: https://patentgrep.com/patent/US20220027460A1

## CPC

- G06F 21/54: by adding security routines or objects to programs
- G06F 9/30043: {LOAD or STORE instructions; Clear instruction}
- G06F 9/30047: {Prefetch instructions; cache control instructions}
- G06F 9/3826: {Bypassing or forwarding of data results, e.g. locally between pipeline stages or within a pipeline stage}
- G06F 9/3834: {Maintaining memory consistency}
- G06F 9/3838: {Dependency mechanisms, e.g. register scoreboarding}
- G06F 9/3842: {Speculative instruction execution}
- G06F 21/554: {involving event detection and direct action}
- G06F 21/556: {involving covert channels, i.e. data leakage between processes (inhibiting the analysis of circuitry or operation with measures against power attack G06F21/755)}
- G06F 21/75: by inhibiting the analysis of circuitry or operation
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

In order to mitigate side channel attacks that exploit speculative store-to-load forwarding, a store dependence predictor is used to prevent store-to-load forwarding if the load and store instructions do not have a matching translation context (TC). In one design, a store queue (SQ) stores the TC—a function of the privilege mode (PM), address space identifier (ASID), and/or virtual machine identifier (VMID)—of each store and conditions store-to-load forwarding on matching store and load TCs. In another design, a memory dependence predictor (MDP) disambiguates predictions of store-to-load forwarding based on the load instruction's TC. In each design, the MDP or SQ does not predict or allow store-to-load forwarding for loads whose addresses, but not their TCs, match an MDP entry.

## Claims

### Claim 1

A method for mitigating side channel attacks that exploit speculative store-to-load forwarding in a processor, comprising:
using an identifier and translation context (TC) of a load instruction to access a store dependence predictor that predicts whether store data is or will be available and forwardable to the load instruction;
generating, by the store dependence predictor, a signal that reflects said prediction of whether store data is or will be available and forwardable to the load instruction; and
wherein a TC comprises an address space identifier (ASID), a virtual machine identifier (VMID), a privilege mode (PM) or a translation regime (TR), a combination of two or more of the ASID, VMID, and TR or PM, or a hash and/or subset of the ASID, VMID, and/or TR or PM.

### Claim 2 (depends on 1)

The method of claim 1, wherein the store dependence predictor is predictive, at least in part, because the prediction is made before making a full data address comparison of the load instruction with one or more outstanding store instructions.

### Claim 3 (depends on 1)

The method of claim 1, wherein the store dependence predictor is predictive, at least in part, because the prediction is made before verifying that the load instruction has permission to access the store data.

### Claim 4 (depends on 1)

The method of claim 1, further comprising using the TC to determine which entry to store, increment or decrement a confidence value associated with the load instruction.

### Claim 5 (depends on 1)

The method of claim 1, wherein said signal selects between forwarding of the store data to the load instruction and not forwarding of the store data to the load instruction.

### Claim 6 (depends on 1)

The method of claim 1, wherein said signal selects between accessing and not accessing a store queue to forward the store data.

### Claim 7 (depends on 1)

The method of claim 1, wherein the store dependence predictor comprises a store queue and the generated signal comprises a signal that selects between forwarding of the store data to the load instruction and replaying, retrying or stalling the load instruction to load the store data from a cache.

### Claim 8 (depends on 1)

The method of claim 1, wherein the store dependence predictor is accessed with an index and/or tag, and said using a TC of the load instruction to access a store dependence predictor comprises generating the index and/or tag by hashing or concatenating the TC with other information.

### Claim 9 (depends on 1)

The method of claim 1, wherein said using a TC of the load instruction to access a store dependence predictor comprises:
comparing a TC indicated by an index, tag or entry of the store dependence predictor with the TC of the load instruction;
wherein said comparing a TC is one of the following:
comparing a hash of the TC with other information; and/or
concatenating the TC with other information.

### Claim 10 (depends on 1)

The method of claim 1,
wherein the store dependence predictor comprises a memory array; and
wherein said using a TC of the load instruction to access a store dependence predictor comprises hashing or concatenating the TC of the load instruction with an instruction address of the load instruction to generate an index into the store dependence predictor memory array.

### Claim 11 (depends on 1)

The method of claim 1,
wherein the store dependence predictor comprises a content-addressable memory that holds TCs and data addresses of each of a plurality of store instructions; and
wherein said predicting whether a load instruction will successfully execute and commit by speculatively forwarding uncommitted store data comprises determining whether the TC of the load instruction matches the TC of any of the store instructions.

### Claim 12

A processor that mitigates side channel attacks that exploit speculative store-to-load forwarding in a processor, the processor comprising:
a store dependence predictor that predicts whether store data is or will be available and forwardable to a load instruction, wherein the store dependence predictor:
is accessible using an identifier and TC of a load instruction; and
generates a signal that reflects said prediction of whether store data is available and forwardable to the load instruction;
wherein a TC comprises an address space identifier (ASID), a virtual machine identifier (VMID), a privilege mode (PM) or a translation regime (TR), a combination of two or more of the ASID, VMID, and TR or PM, or a hash and/or subset of the ASID, VMID, and/or TR or PM.

### Claim 13 (depends on 12)

The processor of claim 12, wherein the store dependence predictor is predictive, at least in part, because the prediction is made before making a full data address comparison of the load instruction with the store instruction.

### Claim 14 (depends on 12)

The processor of claim 12, wherein the store dependence predictor is predictive, at least in part, because the prediction is made before verifying that the load instruction has permission to access the store data.

### Claim 15 (depends on 12)

The processor of claim 12, further comprising:
update logic associated with the store-to-dependence predictor that updates the store dependence predictor based on whether a load instruction speculatively forwarded data from a store instruction, whether the foregoing act or its absence was correct;
wherein the update logic uses the TC to access the store dependence predictor in order to perform said updates.

### Claim 16 (depends on 12)

The processor of claim 12, wherein the store dependence predictor compares a TC associated with an entry of the store dependence predictor with the TC of the load instruction.

### Claim 17 (depends on 12)

The processor of claim 12, wherein the store dependence predictor is accessible by a hash or concatenation of the TC of the load instruction with an instruction address of the load instruction.

### Claim 18 (depends on 12)

The processor of claim 12, wherein the signal selects between forwarding of the store data to the load instruction and not forwarding of the store data to the load instruction.

### Claim 19 (depends on 12)

The processor of claim 12, wherein the signal selects between accessing and not accessing a store queue to forward the store data.

### Claim 20 (depends on 12)

The processor of claim 12, wherein:
the store dependence predictor comprises a store queue; and
the generated signal comprises a signal that signals whether there was at least one entry in the store queue containing a TC and data address that matches that of the load instruction.

### Claim 21 (depends on 12)

The processor of claim 12, wherein the store dependence predictor is accessed with an index and/or tag, and said using a TC of the load instruction comprises:
generating the index and/or tag by hashing or concatenating the TC with other information; and
accessing the store dependence predictor with the index and/or tag.

### Claim 22 (depends on 12)

The processor of claim 12,
wherein the store dependence predictor comprises a content-addressable memory that holds TCs of each of a plurality of store instructions; and
wherein said prediction is also reflective of whether the TC of the load instruction matches the TC of any of the store instructions.

### Claim 23 (depends on 12)

The processor of claim 12,
wherein the store dependence predictor comprises a store queue comprising a plurality of entries that are selectable; and
wherein the store queue is a content addressable memory that is accessed by camming the TC and a data address, or portion or derivative thereof, against the plurality of entries of the store queue.

### Claim 24

A non-transitory computer-readable medium having instructions stored thereon that are capable of causing or configuring a processor for mitigating side channel attacks, the processor comprising:
a store dependence predictor that predicts whether store data is or will be available and forwardable to a load instruction, wherein the store dependence predictor:
is accessible using an identifier and TC of a load instruction; and
generates a signal that reflects said prediction of whether store data is available and forwardable to the load instruction;
wherein a TC comprises an ASID, VMID, PM or TR, a combination of two or more of the ASID, VMID, and TR or PM, or a hash and/or subset of the ASID, VMID, and/or TR or PM.
