Page MenuHomeFreeBSD

D62063.1795990192.diff
No OneTemporary

Authored By
Unknown
Size
415 B
Referenced Files
None
Subscribers
None

D62063.1795990192.diff

diff --git a/sys/amd64/amd64/fpu.c b/sys/amd64/amd64/fpu.c
--- a/sys/amd64/amd64/fpu.c
+++ b/sys/amd64/amd64/fpu.c
@@ -375,6 +375,10 @@
load_cr4(cr4 | CR4_XSAVE);
load_xcr(XCR0, xsave_mask);
+ } else if ((cpu_stdext_feature2 & CPUID_STDEXT2_PKU) != 0) {
+ /* Without XSAVE, PKRU is not saved on context switches. */
+ load_cr4(rcr4() & ~CR4_PKE);
+ cpu_stdext_feature2 &= ~CPUID_STDEXT2_PKU;
}
/*

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 29, 10:09 PM (8 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
42023225
Default Alt Text
D62063.1795990192.diff (415 B)

Event Timeline