Format of a Page-Table Entry that Maps a 4-KByte Page Bit
Format of an EPT Page-Table Entry that Maps a 4-KByte Page Bit
似乎使用EPT.bit2和EPT.bit10来确定是否允许在主管模式\用户模式下获取指令。
但是我怎么知道IPA是监督模式的线性地址还是用户模式的线性地址?U/S位在page table中的应用
如果我的理解是正确的,这意味着我们必须结合page table和EPT来判断是否允许指令获取,对吗?
在Intel Manual Volume 3C, Chapter 27, 2.3.2 EPT Violations中,手册描述了不允许取取的几种情况。我只关心VM-execution control = 1时的情况。
VM-execution control的设置。
如果控制线性地址转换的分页结构条目中的至少一个
- If the control is 0, an instruction fetch from a byte is prevented if bit 2 (execute access) was clear in any of the EPT paging-structure entries used to translate the guest-physical address of the byte.
- If the `control is 1`, an instruction fetch from a byte is prevented in either of the following cases:
- Paging maps the `linear address of the byte as a supervisor-mode address` and `bit 2(EPT.bit2)` (execute access for supervisor-mode linear addresses) was clear in any of the EPT paging-structure entries used to translate the guest-physical address of the byte.
(位2)为0,则linear address as a supervisor-mode address寻呼映射U/S flag(of page table)。
如果所有控制线性地址转换的分页结构条目中的
- Paging maps the `linear address of the byte as a user-mode address` and `bit 10 (EPT.bit10)`(execute access for user- mode linear addresses) was clear in any of the EPT paging-structure entries used to translate the guest- physical address of the byte.
为1,则linear address as a user-mode address将映射为U/S flag(of page table)。如果禁用分页(CR0.PG = 0),则每个线性地址都是用户模式地址。
我怎么知道一个地址是supervisor-mode address还是user-mode address?通过地址的高位(0 0xffff)..。是主管模式地址,0x0000.是用户模式地址)吗?
就Page-Table Entry、EPT-entry和EPT Violations而言,我们是否可以这样说:
如果允许在page table的U/S = 1中的U/S = 1,那么EPT.bit10 = 1在< circumstances >d39中允许获取。H 240H 141在其他中是不允许的。
发布于 2021-07-01 19:36:36
使用设置为监控程序模式的高位地址是一种惯例,但它不影响地址转换或保护的方式。CPL ( CS寄存器的位1:0 )控制访问是监督模式还是用户模式。如果CPL <3时,则访问为监控程序模式访问;如果CPL =3时,则访问为用户模式访问.
如果“基于模式的EPT执行控制”为1:
如果在所有页面表级别禁用
。
如果“基于模式的EPT执行控制”为0:
如果在所有页面表级别禁用
此外,如果CR4.PAE为1,则所有页面表级别的bit 63 (XD)必须为0。
https://stackoverflow.com/questions/68207833
复制相似问题