Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F141966016
D43763.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
881 B
Referenced Files
None
Subscribers
None
D43763.diff
View Options
diff --git a/sys/x86/x86/identcpu.c b/sys/x86/x86/identcpu.c
--- a/sys/x86/x86/identcpu.c
+++ b/sys/x86/x86/identcpu.c
@@ -1343,6 +1343,7 @@
static struct {
const char *vm_cpuid;
int vm_guest;
+ void (*init)(void);
} vm_cpuids[] = {
{ "XenVMMXenVMM", VM_GUEST_XEN }, /* XEN */
{ "Microsoft Hv", VM_GUEST_HV }, /* Microsoft Hyper-V */
@@ -1355,6 +1356,7 @@
static void
identify_hypervisor_cpuid_base(void)
{
+ void (*init_fn)(void) = NULL;
u_int leaf, regs[4];
int i;
@@ -1391,6 +1393,7 @@
if (strncmp((const char *)®s[1],
vm_cpuids[i].vm_cpuid, 12) == 0) {
vm_guest = vm_cpuids[i].vm_guest;
+ init_fn = vm_cpuids[i].init;
break;
}
@@ -1423,10 +1426,13 @@
* preferred.
*/
vm_guest != VM_GUEST_HV)
- return;
+ break;
}
}
}
+
+ if (init_fn != NULL)
+ init_fn();
}
void
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jan 15, 7:03 AM (7 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27636883
Default Alt Text
D43763.diff (881 B)
Attached To
Mode
D43763: x86/cpu: introduce an optional hook for early
Attached
Detach File
Event Timeline
Log In to Comment