# US 2022/0091851 A1 · System, Apparatus And Methods For Register Hardening Via A Micro-Operation

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

- Number: US 2022/0091851 A1
- Document ID: US20220091851A1
- Status: Published application
- Kind: A1
- Application number: 17/029,335
- Filed: 2020-09-23
- Published: 2022-03-24
- Earliest claimed: 2020-09-23
- Assignees: Intel Corporation
- Applicants: Intel Corporation
- Inventors: FANGFEI LIU; ALAA ALAMELDEEN; ABHISHEK BASAK; SCOTT CONSTABLE; FRANCIS MCKEEN; JOSEPH NUZMAN; CARLOS ROZAS; THOMAS UNTERLUGGAUER; XIANG ZOU
- Web page: https://patentgrep.com/patent/US20220091851A1

## CPC

- G06F 9/3842: {Speculative instruction execution}
- G06F 9/30043: {LOAD or STORE instructions; Clear instruction}
- G06F 9/30087: {Synchronisation or serialisation instructions}
- G06F 9/30145: {Instruction analysis, e.g. decoding, instruction word fields}
- G06F 9/3838: {Dependency mechanisms, e.g. register scoreboarding}
- G06F 9/4881: {Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues}
- G06F 21/54: by adding security routines or objects to programs
- G06F 2221/034: Test or assess a computer or a system
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

In one embodiment, a processor includes: a decode circuit to decode a load instruction that is to load an operand to a destination register, the decode circuit to generate at least one fencing micro-operation (μop) associated with the destination register; and a scheduler circuit coupled to the decode circuit. The scheduler circuit is to prevent speculative execution of one or more instructions that consume the operand in response to the at least one fencing μop. Other embodiments are described and claimed.

## Claims

### Claim 1

A processor comprising:
a decode circuit to decode a load instruction that is to load an operand to a destination register, the decode circuit to generate at least one fencing micro-operation (μop) associated with the destination register; and
a scheduler circuit coupled to the decode circuit, wherein the scheduler circuit is to prevent speculative execution of one or more instructions that consume the operand in response to the at least one fencing μop.

### Claim 2 (depends on 1)

The processor of claim 1, wherein the decode circuit further is to decode the load instruction into one or more load μops and generate the at least one fencing μop in response to the load instruction.

### Claim 3 (depends on 1)

The processor of claim 1, wherein the scheduler circuit is to allocate a resource in a dependency structure for the at least one fencing μop.

### Claim 4 (depends on 3)

The processor of claim 3, wherein the dependency structure comprises a dependency matrix and the resource comprises a row of the dependency matrix including a plurality of entries.

### Claim 5 (depends on 1)

The processor of claim 1, wherein the load instruction identifies the destination register, and the decode circuit is to decode the load instruction into a first load μop to load the operand to a second register, the at least one fencing μop comprising a μop to move the operand from the second register to the destination register.

### Claim 6 (depends on 1)

The processor of claim 1, wherein the scheduler circuit is to make the at least one fencing μop dependent on one or more prior branches.

### Claim 7 (depends on 1)

The processor of claim 1, further comprising a configuration register to store an enable indicator for load hardening, wherein when the enable indicator is disabled, the decode circuit is to not generate the at least one fencing μop.

### Claim 8 (depends on 1)

The processor of claim 1, wherein the load instruction comprises a hint to indicate to the decode circuit to generate the at least one fencing μop.

### Claim 9 (depends on 1)

The processor of claim 1, wherein the at least one fencing μop is to prevent a transient execution attack.

### Claim 10

At least one computer readable storage medium having stored thereon instructions, which if performed by a machine cause the machine to perform a method comprising:
receiving, in a scheduler circuit of a processor, a fencing micro-operation (μop) that identifies a register to be prevented from being accessed speculatively;
speculatively obtaining an operand to be stored in the register; and
preventing the operand stored in the register from being accessed by at least one consumer until at least one branch operation prior to the fencing μop correctly resolves.

### Claim 11 (depends on 10)

The at least one computer readable storage of claim 10, wherein the method further comprises receiving the fencing μop from a decode circuit, the decode circuit generating the fencing μop in response to a fencing instruction that identifies the register.

### Claim 12 (depends on 10)

The at least one computer readable storage of claim 10, wherein the method further comprises receiving the fencing μop from a decode circuit, the decode circuit generating the fencing μop in response to a load instruction that identifies the register.

### Claim 13 (depends on 12)

The at least one computer readable storage of claim 12, wherein the method further comprises the decode circuit generating the fencing μop in response to a hint of the load instruction that specifies speculative load hardening.

### Claim 14 (depends on 10)

The at least one computer readable storage of claim 10, wherein the method further comprises scheduling the fencing μop for execution after the operand is loaded into the register and one or more prior branch instructions correctly resolved.

### Claim 15 (depends on 10)

The at least one computer readable storage of claim 10, wherein the method further comprises receiving the fencing μop comprising a move μop to move the operand from a second register to the register.

### Claim 16

A system comprising:
a processor comprising:
at least one core, the at least one core comprising:
a decode circuit to decode a first user-level instruction that is to prevent an operand stored in a first register from being speculatively accessed, wherein the decode circuit is to generate at least one fencing micro-operation (μop) in response to the first user-level instruction; and
a scheduler circuit coupled to the decode circuit, wherein the scheduler circuit is, in response to the at least one fencing μop, to prevent speculative access of the operand stored in the first register by one or more instructions that consume the operand; and
a system memory coupled to the processor.

### Claim 17 (depends on 16)

The system of claim 16, wherein the at least one core further comprises:
a branch predictor to predict a direction of a branch instruction; and
a pipeline circuit to speculatively load the operand into the first register in response to the direction prediction.

### Claim 18 (depends on 17)

The system of claim 17, wherein when the direction prediction resolves correctly, the scheduler circuit is to enable the one or more instructions to access the operand.

### Claim 19 (depends on 16)

The system of claim 16, wherein the processor further comprises a configuration register to store an enable indicator for load hardening, wherein when the enable indicator is disabled, the decode circuit is to not generate the at least one fencing μop.

### Claim 20 (depends on 16)

The system of claim 16, wherein the at least one fencing μop is to prevent a transient execution attack.
