Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F178177811
D53210.1796203856.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
987 B
Referenced Files
None
Subscribers
None
D53210.1796203856.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
@@ -564,10 +564,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
Wed, Dec 2, 9:30 AM (11 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
42028540
Default Alt Text
D53210.1796203856.diff (987 B)
Attached To
Mode
D53210: vmm/amd64: Bhyve returns bogus cpuid 8000_001D leaf
Attached
Detach File
Event Timeline