Home

IA32SYSENTERCS

IA32_SYSENTER_CS (often referred to as IA32SYSENTERCS in shorthand) is a model-specific register in the IA-32 architecture that stores the kernel code segment selector used by the SYSENTER/SYSEXIT fast system call mechanism. The value programmed into this MSR is loaded into the CS register when the SYSENTER instruction executes, switching the processor from user mode to the kernel code segment.

For correct operation, the selector must refer to a valid, present descriptor in the Global Descriptor Table

Access to IA32_SYSENTER_CS is restricted to privileged code; writes to this MSR require ring-0 access via the

In 64-bit environments, SYSENTER remains supported primarily for compatibility with 32-bit code, but modern x86-64 systems

See also: SYSENTER, IA32_SYSENTER_ESP, IA32_SYSENTER_EIP, SYSRET, and Intel's Software Developer Manuals.

(GDT)
or
Local
Descriptor
Table
(LDT)
with
privilege
level
0.
The
SYSENTER
sequence
is
complemented
by
two
other
MSRs
that
supply
the
remaining
state
needed
for
the
transition:
IA32_SYSENTER_ESP
provides
the
kernel
stack
pointer
(to
load
into
ESP/RSP)
and
IA32_SYSENTER_EIP
provides
the
address
of
the
kernel
entry
point
to
jump
to.
WRMSR
instruction,
and
user-space
processes
cannot
modify
it
directly.
Operating
systems
typically
configure
these
MSRs
during
boot
or
process
initialization
to
establish
a
fast
path
into
the
kernel.
more
commonly
use
the
SYSCALL/SYSRET
mechanism
for
system
calls.
Nevertheless,
the
IA32_SYSENTER_CS
register
remains
part
of
the
legacy
fast
system
call
interface
and
is
documented
in
Intel
manuals
for
completeness.