Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177544726
D60122.1794677100.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D60122.1794677100.diff
View Options
diff --git a/sys/amd64/vmm/vmm_cpuid.c b/sys/amd64/vmm/vmm_cpuid.c
--- a/sys/amd64/vmm/vmm_cpuid.c
+++ b/sys/amd64/vmm/vmm_cpuid.c
@@ -7,6 +7,7 @@
* Copyright 2014 Pluribus Networks Inc.
* Copyright 2018 Joyent, Inc.
* Copyright 2025 Oxide Computer Company
+ * Copyright (c) 2026 The FreeBSD Foundation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -538,6 +539,9 @@
if (cpu_exthigh != 0 && func >= 0x80000000) {
if (func > cpu_exthigh)
func = cpu_exthigh;
+ } else if (func >= CPUID_VM_SIGNATURE + CPUID_VM_BHYVE_OFF) {
+ if (func > CPUID_VM_HIGH + CPUID_VM_BHYVE_OFF)
+ func = CPUID_VM_HIGH + CPUID_VM_BHYVE_OFF;
} else if (func >= CPUID_VM_SIGNATURE) {
if (func > CPUID_VM_HIGH)
func = CPUID_VM_HIGH;
@@ -1044,13 +1048,15 @@
break;
case CPUID_VM_SIGNATURE:
- regs[0] = CPUID_VM_HIGH;
+ case CPUID_VM_SIGNATURE + CPUID_VM_BHYVE_OFF:
+ regs[0] = CPUID_VM_HIGH + (func - CPUID_VM_SIGNATURE);
bcopy(bhyve_id, ®s[1], 4);
bcopy(bhyve_id + 4, ®s[2], 4);
bcopy(bhyve_id + 8, ®s[3], 4);
break;
case CPUID_BHYVE_FEATURES:
+ case CPUID_BHYVE_FEATURES + CPUID_VM_BHYVE_OFF:
regs[0] = CPUID_BHYVE_FEAT_EXT_DEST_ID;
regs[1] = 0;
regs[2] = 0;
diff --git a/sys/amd64/vmm/x86.h b/sys/amd64/vmm/x86.h
--- a/sys/amd64/vmm/x86.h
+++ b/sys/amd64/vmm/x86.h
@@ -59,6 +59,8 @@
#define CPUID_VM_SIGNATURE 0x40000000
#define CPUID_VM_HIGH CPUID_BHYVE_FEATURES
+#define CPUID_VM_BHYVE_OFF 0x100
+
/*
* CPUID instruction Fn0000_0001:
*/
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 14, 5:25 PM (2 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41728458
Default Alt Text
D60122.1794677100.diff (1 KB)
Attached To
Mode
D60122: vmm/amd64: support CPUID functions 0x40000100 and above
Attached
Detach File
Event Timeline