Author: tychon
Date: Fri Apr 11 18:19:21 2014
New Revision: 264347
URL: http://svnweb.freebsd.org/changeset/base/264347

Log:
  Account for the "plus 1" encoding of the CPUID Function 4 reported
  core per package and cache sharing values.
  
  Approved by:  grehan (co-mentor)

Modified:
  head/sys/amd64/vmm/x86.c

Modified: head/sys/amd64/vmm/x86.c
==============================================================================
--- head/sys/amd64/vmm/x86.c    Fri Apr 11 16:55:25 2014        (r264346)
+++ head/sys/amd64/vmm/x86.c    Fri Apr 11 18:19:21 2014        (r264347)
@@ -219,9 +219,18 @@ x86_emulate_cpuid(struct vm *vm, int vcp
 
                        /*
                         * Do not expose topology.
+                        *
+                        * The maximum number of processor cores in
+                        * this physical processor package and the
+                        * maximum number of threads sharing this
+                        * cache are encoded with "plus 1" encoding.
+                        * Adding one to the value in this register
+                        * field to obtains the actual value.
+                        *
+                        * Therefore 0 for both indicates 1 core per
+                        * package and no cache sharing.
                         */
                        regs[0] &= 0xffff8000;
-                       regs[0] |= 0x04008000;
                        break;
 
                case CPUID_0000_0007:
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to