You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/instructions/tlb.rs
+85
Original file line number
Diff line number
Diff line change
@@ -23,3 +23,88 @@ pub fn flush_all() {
23
23
let(frame, flags) = Cr3::read();
24
24
unsafe{Cr3::write(frame, flags)}
25
25
}
26
+
27
+
/// The Invalidate PCID Command to execute.
28
+
#[derive(Debug)]
29
+
pubenumInvPicdCommand{
30
+
/// The logical processor invalidates mappings—except global translations—for the linear address and PCID specified.
31
+
Address(VirtAddr,Pcid),
32
+
33
+
/// The logical processor invalidates all mappings—except global translations—associated with the PCID.
34
+
Single(Pcid),
35
+
36
+
/// The logical processor invalidates all mappings—including global translations—associated with any PCID.
37
+
All,
38
+
39
+
/// The logical processor invalidates all mappings—except global translations—associated with any PCID.
40
+
AllExceptGlobal,
41
+
}
42
+
43
+
/// The INVPCID descriptor comprises 128 bits and consists of a PCID and a linear address.
44
+
/// For INVPCID type 0, the processor uses the full 64 bits of the linear address even outside 64-bit mode; the linear address is not used for other INVPCID types.
45
+
#[repr(C)]
46
+
#[derive(Debug)]
47
+
structInvpcidDescriptor{
48
+
address:u64,
49
+
pcid:u64,
50
+
}
51
+
52
+
/// Structure of a PCID. A PCID has to be <= 4096 for x86_64.
53
+
#[repr(transparent)]
54
+
#[derive(Debug)]
55
+
pubstructPcid(u16);
56
+
57
+
implPcid{
58
+
/// Create a new PCID. Will result in a failure if the value of
0 commit comments