linux page table entry struct

            Page Table Entry

The access control information is held in the PTE and is CPU specific; figure bit fields have the following meanings:

V
Valid, if set this PTE is valid,       页表是否可用
FOE
``Fault on Execute‘‘, Whenever an access of this type occurs, the CPU reports a page fault and passes control to the operating system,  执行错误
FOW
``Fault on Write‘‘,    写错误
FOR 
``Fault on Read‘‘,   读错误
ASM
Address Space Match. This is used when the operating system wishes to clear only some of the entries from the Translation Buffer,  是否允许操作系统从页表绶存中清除
KRE
Code running in kernel mode can read this page,        内核模式可读
URE
Code running in user mode can read this page,         用户模式可读
GH
Granularity hint used when mapping an entire block with a single Translation Buffer entry rather than many,
KWE
Code running in kernel mode can write to this page,   内核模式可写
UWE
Code running in kernel mode can write this page,      用户模式可写
PFN
For PTEs with the V bit set, this field contains the physical Page Frame Number (PFN) for this PTE. For invalid PTEs, if this field is not zero, it contains information about where the page is in the swap file.    页帧号

The following two bits are defined and used by Linux:

__PAGE__DIRTY
if set, the page needs to be written out to the swap file,     如果被设备的话,可写到交换分区文件当中
__PAGE__ACCESSED
Used by Linux to mark a page as having been accessed.    标志是否之前被访问

原文地址:https://www.cnblogs.com/lianghong881018/p/10288457.html

时间: 2024-08-01 20:31:42

linux page table entry struct的相关文章

Virtual Memory PAGE TABLE STRUCTURE

COMPUTER ORGANIZATION AND ARCHITECTURE DESIGNING FOR PERFORMANCE NINTH EDITION The basic mechanism for reading a word from memory involves the translation of a virtual, or logical, address, consisting of page number and offset, into a physical addres

查找idt table 所對應的page table in Linux

#include <linux/kernel.h> #include <linux/module.h> #include <linux/delay.h> #include <linux/string.h> #include <linux/jump_label.h> #include <linux/types.h> #include <asm/pgtable.h> #include <asm/pgtable_64.h&

Kernel Page Global Directory (PGD) of Page table of Process created in Linux Kernel

Kernel Page Global Directory (PGD) of User process created 在早期版本: 在fork一个进程的时候,必须建立进程自己的内核页目录项(内核页目录项要与用户空间的页目录放在同一个物理地址连续的页面上,所以不能共享,但所有进程的内核页表与进程0共享)3G用户,页目录中一项映射4M的空间(一项页目录1024项页表,每项页表对应1个页面4K),即:#define PGDIR_SHIFT 22#define PGDIR_SIZE (1UL << P

Page table, TLB, Cache简介(x86)

分页模型 以x86为例, intel的处理器的分页单元处理4kB的页, 32位的线性地址(虚拟地址)被分为3个域: -Directory, 目录, 最高10位 -Table, 页表, 中间10位 -Offset, 偏移, 低12位 -正在使用的页目录的地址放在控制寄存器CR3中, directory字段决定页目录中的目录项, 而table则指向适当的页表项, 该页表项包含有所指向页框的物理地址, 而offset则决定页框内的具体地址. -地址位(31-12).指向页目录项/页表项/页的基地址.

如何修改SAP table entry

1) SE16或SE11打开相应的表. 2) 打开自己要更改的那条记录,并在命令窗口中敲入/h. 3) 提示debug模式启用,此时再敲回车,进入debug界面. 4) 单步执行,进入第一个函数,如上图,然后在右侧输入code变量,默认值是"SHOW"即只读,只要改成EDIT即可.(另注,INSR是插入新的entry) 5)  按F8直接跳回原来的table entry界面,只是现在是可编辑状态了.

linux内核中的struct rlimit结构体详解

   在linux内核中,对一个进程获取系统资源的数量进行了限制.那么linux内核是如何实现这种对一个进程的各种资源的限制呢?    linux使用struct rlimit结构体来实现的,rlimit是 resource limit的缩写.    struct rlimit           {               unsigned int rlim_cur;  /* soft limit */               unsigned int rlim_max;  /* ha

Linux page cache

Overview Block device layer page cache IO scheduer Page cache contains all file I/O data, direct I/O bypasses the page cache. Page cache helps Linux to economize I/O – Read requests can be made faster by adding a read ahead quantity, depending on the

linux page buffer cache深入理解

Linux上free命令的输出. 下面是free的运行结果,一共有4行.为了方便说明,我加上了列号.这样可以把free的输出看成一个二维数组FO(Free Output).例如: FO[2][1] = 24677460 FO[3][2] = 10321516 1          2          3          4          5          61              total       used       free     shared    buffers

KVM硬件辅助虚拟化之 EPT(Extended Page Table)

传统OS环境中,CPU对内存的访问都必须通过MMU将虚拟地址VA转换为物理地址PA从而得到真正的Physical Memory Access,即:VA->MMU->PA,见下图. 虚拟运行环境中由于Guest OS所使用的物理地址空间并不是真正的物理内存,而是由VMM供其所使用一层虚拟的物理地址空间,为使MMU能够正确的转换虚实地址,Guest中的地址空间的转换和访问都必须借助VMM来实现,这就是内存虚拟化的主要任务,即:GVA->MMU Virtualation->HPA,见下图