Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153364246
D53210.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D53210.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
@@ -6,7 +6,7 @@
*
* Copyright 2014 Pluribus Networks Inc.
* Copyright 2018 Joyent, Inc.
- * Copyright 2022 Oxide Computer Company
+ * Copyright 2024 Oxide Computer Company
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -538,7 +538,7 @@
goto default_leaf;
/*
- * Similar to Intel, generate a ficticious cache
+ * Similar to Intel, generate a fictitious cache
* topology for the guest with L3 shared by the
* package, and L1 and L2 local to a core.
*/
@@ -567,10 +567,15 @@
break;
}
- logical_cpus = MIN(0xfff, logical_cpus - 1);
- regs[0] = (logical_cpus << 14) | (1 << 8) |
- (level << 5) | func;
- regs[1] = func > 0 ? CACHE_LINE_SIZE - 1 : 0;
+ if (level == 0) {
+ regs[0] = 0;
+ regs[1] = 0;
+ } else {
+ logical_cpus = MIN(0xfff, logical_cpus - 1);
+ regs[0] = (logical_cpus << 14) | (1 << 8) |
+ (level << 5) | func;
+ regs[1] = func > 0 ? CACHE_LINE_SIZE - 1 : 0;
+ }
/*
* ecx: Number of cache ways for non-fully
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Apr 21, 5:46 PM (15 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31302073
Default Alt Text
D53210.diff (1 KB)
Attached To
Mode
D53210: vmm/amd64: Bhyve returns bogus cpuid 8000_001D leaf
Attached
Detach File
Event Timeline
Log In to Comment