Skip to content

Commit 802c292

Browse files
committed
add PageFaultErrorCode::HLAT
Some Intel CPUs have a feature called hypervisor-managed linear-address translation (HLAT). The details of how HLAT paging works are a bit to complicated for this commit message, but suffice it to say that with HLAT, there are two root page tables, the regular PML4/PML5 and the HLAT pointer (HLATP). If the page fault occured while translating with the HLATP, the HLAT bit (7) is set in the error code. If the page fault occured while translating with the regular PML4/PML5, the HLAT bit is not set.
1 parent ce5c6ac commit 802c292

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/structures/idt.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1198,6 +1198,10 @@ bitflags! {
11981198
/// access.
11991199
const SHADOW_STACK = 1 << 6;
12001200

1201+
/// If this flag is set, it indicates that the page fault occured during HLAT paging
1202+
/// (Intel-only).
1203+
const HLAT = 1 << 7;
1204+
12011205
/// If this flag is set, it indicates that the page fault was caused by SGX access-control
12021206
/// requirements (Intel-only).
12031207
const SGX = 1 << 15;

0 commit comments

Comments
 (0)