clgi

Clear Global Interrupt Flag

CLGI

Disables global interrupts (AMD SVM).

Details

Clears the Global Interrupt Flag (GIF) in the VMCB, which disables interrupts and exceptions at the SVM guest level. This is a privileged instruction that requires CPL=0 and SVM capability. It does not modify EFLAGS but affects the processor's ability to accept external interrupts.

Pseudocode Operation

GIF ← 0; // Global interrupt flag disabled

Example

CLGI

Encoding

Binary Layout
0F
+0
01
+1
DD
+2
 
Format SVM
Opcode 0F 01 DD
Extension SVM

Operands

Reference (AMD APM)

Instruction Forms

Opcode Instruction Op/En 64/32-bit Mode CPUID Description
0F 01 DD CLGI Clears the global interrupt flag (GIF).

Description

Clears the global interrupt flag (GIF). While GIF is zero, all external interrupts are disabled. This is a Secure Virtual Machine instruction. Support for the SVM architecture and the SVM instructions is indicated by CPUID Fn8000_0001_ECX[SVM] = 1. For more information on using the CPUID instruction, see the reference page for the CPUID instruction on page 165. This instruction generates a #UD exception if SVM is not enabled. See “Enabling SVM” in APM Volume 2.

Flags Affected

None.

Exceptions

Exceptions

Virtual Exception Real 8086 Protected Cause of Exception The SVM instructions are not supported as indicated by X X X CPUID Fn8000_0001_ECX[SVM] = 0. Invalid opcode, #UD X Secure Virtual Machine was not enabled (EFER.SVME=0). X X Instruction is only recognized in protected mode. General protection, X CPL was not 0. #GP 372 System Instruction Reference