HRESET

History Reset

stableVMJITAOTinstruction

Encodings

OpcodeInstructionOp/En64-bitCompat/LegacyDescription
F3 0F 3A F0 C0 /ibHRESET imm8, <EAX>AValidValidProcessor history reset request. Controlled by the EAX implicit operand.

Operand encoding

Each mode is a value of the Op/En column above. It says which field of the encoded instruction carries each operand, in the order they are written, and whether the instruction reads it, writes it or both.

A

  1. modrm.rm lecturaModRM byte, r/m field (bits 2-0); with the SIB byte and the displacement when the mod field asks for them

Measured cost

Loading measurements from arch-data...

Description

Requests the processor to selectively reset selected components of hardware history maintained by the current logical processor. HRESET operation is controlled by the implicit EAX operand. The value of the explicit imm8 operand is ignored. This instruction can only be executed at privilege level 0.

The HRESET instruction can be used to request reset of multiple components of hardware history. Prior to the execution of HRESET, the system software must take the following steps:

  1. Enumerate the HRESET capabilities via CPUID.20H.00H:EBX, which indicates what components of hardware history can be reset.
  1. Only the bits enumerated by CPUID.20H.00H:EBX can be set in the IA32_HRESET_ENABLE MSR.

HRESET causes a general-protection exception (#GP) if EAX sets any bits that are not set in the IA32_HRESET_EN- ABLE MSR.

Any attempt to execute the HRESET instruction inside a transactional region will result in a transaction abort.

Operation

IF EAX = 0

  THEN NOP
  ELSE

      FOREACH i such that EAX[i] = 1
         Reset prediction history for feature i

FI

Flags affected

None.

Exceptions

Protected mode
#GP(0)If CPL > 0 or (EAX AND NOT IA32_HRESET_ENABLE) 0.
#UDIf CPUID.07H.01H:EAX.HRESET[22] = 0.
Real address mode
Same exceptions as in protected mode.
Virtual-8086 mode
#GP(0)HRESET instruction is not recognized in virtual-8086 mode.
Compatibility mode
Same exceptions as in protected mode.
64-bit mode
Same exceptions as in protected mode.

Sources