Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107171734
D14810.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
779 B
Referenced Files
None
Subscribers
None
D14810.diff
View Options
Index: head/sys/x86/x86/identcpu.c
===================================================================
--- head/sys/x86/x86/identcpu.c
+++ head/sys/x86/x86/identcpu.c
@@ -1304,6 +1304,18 @@
if (cpu_feature2 & CPUID2_HV) {
vm_guest = VM_GUEST_VM;
do_cpuid(0x40000000, regs);
+
+ /*
+ * KVM from Linux kernels prior to commit
+ * 57c22e5f35aa4b9b2fe11f73f3e62bbf9ef36190 set %eax
+ * to 0 rather than a valid hv_high value. Check for
+ * the KVM signature bytes and fixup %eax to the
+ * highest supported leaf in that case.
+ */
+ if (regs[0] == 0 && regs[1] == 0x4b4d564b &&
+ regs[2] == 0x564b4d56 && regs[3] == 0x0000004d)
+ regs[0] = 0x40000001;
+
if (regs[0] >= 0x40000000) {
hv_high = regs[0];
((u_int *)&hv_vendor)[0] = regs[1];
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jan 12, 5:25 AM (21 h, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15761626
Default Alt Text
D14810.diff (779 B)
Attached To
Mode
D14810: Add a workaround to the hypervisor detection for older versions of KVM.
Attached
Detach File
Event Timeline
Log In to Comment