Skip to main content

Module state

Module state 

Source
Expand description

A snapshot of the architectural state of one virtual CPU.

KVM hands us registers in two structures, kvm_regs and kvm_sregs. CpuState merges them into one value that is cheap to copy and easy to ask questions of: which mode is the CPU in?, what is the current privilege level?, what is the base of the FS segment?

Modules§

gpr
Encoding-order indices of the general-purpose registers.

Structs§

CpuState
Architectural state of one vCPU at an instruction boundary.
Segment
One segment register, as the CPU sees it (selector plus the hidden, cached descriptor).

Enums§

CpuMode
The execution mode the CPU is in, which decides how instructions are decoded and how addresses are formed.
SegReg
Index of a segment register inside CpuState::seg.