Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F178114006
D62063.1796003311.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
415 B
Referenced Files
None
Subscribers
None
D62063.1796003311.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 30, 1:48 AM (11 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
42023225
Default Alt Text
D62063.1796003311.diff (415 B)
Attached To
Mode
D62063: amd64: Disable PKU when XSAVE is not used
Attached
Detach File
Event Timeline