Yes, in Intel architecture there are 2 bit fields (DPL) for the protection
level in most of the segment descriptors.
The 'VM' flag, bit 17 of EFLAGS is for virtual 8086 mode, which denotes the
currently running task (pointed to by GDT, LDT, or IDT) is using an
addressing mode that is compatible with the 8086 address mode.
All this stuff are hardware data types and structures and modes specific to
the Intel architecture protected mode implementation.
In Linux kernel, there is a high level structure called 'task_struct'. This
and other kernel structures abstract or insulate the operation of the
kernel at the lowest level from the intel architecture implementation of
protected mode descriptors, and status flags of the eflags register.
some of the files in the linux kernel source that relate to this (for intel
a good place to get a handle on the 'high level' structures used by Linux to
manipulate cpu and memory resources is in:
The kernel mode in linux applies to kernel memory address space, where by
the memory map area (structures in include/linux/mm.h) are reserved or
allowed access only by the kernel, and modules / drivers that may be loaded
into the kernel.
User mode, is the area of memory, modeled with linux data structures, and
has permissions set such that running processes outside of the kernel may
So, the workings of intel architecture protected mode vs 8086 mode
and usermode vs kernel mode are kind of seperate concepts. This is also how
Linux is able to work on other architectures that do not implement the
fruitful protected mode virtual address segmentation model of Intel
Hope this is helpful
Keyboard not found.
Press F1 to continue...