Page MenuHomeFreeBSD

D48187.id151913.diff
No OneTemporary

D48187.id151913.diff

diff --git a/sys/amd64/vmm/x86.c b/sys/amd64/vmm/x86.c
--- a/sys/amd64/vmm/x86.c
+++ b/sys/amd64/vmm/x86.c
@@ -150,8 +150,6 @@
* pkg_id_shift and other OSes may rely on it.
*/
width = MIN(0xF, log2(threads * cores));
- if (width < 0x4)
- width = 0;
logical_cpus = MIN(0xFF, threads * cores - 1);
regs[2] = (width << AMDID_COREID_SIZE_SHIFT) | logical_cpus;
}
@@ -256,7 +254,7 @@
func = 3; /* unified cache */
break;
default:
- logical_cpus = 0;
+ logical_cpus = sockets * threads * cores;
level = 0;
func = 0;
break;
@@ -266,7 +264,14 @@
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
+ * associative cache, minus 1. Reported value
+ * of zero means there is one way.
+ */
regs[2] = 0;
+
regs[3] = 0;
break;

File Metadata

Mime Type
text/plain
Expires
Tue, Feb 3, 1:13 AM (7 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28419614
Default Alt Text
D48187.id151913.diff (946 B)

Event Timeline