x86: vmm: Fix number of CPU detection from cpuid
authorBarret Rhoden <brho@cs.berkeley.edu>
Mon, 17 Apr 2017 19:04:58 +0000 (15:04 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Mon, 17 Apr 2017 19:04:58 +0000 (15:04 -0400)
commitb866de5095a300d5d5be30c4364607e670cd6326
tree84cfe160bc66aaa98da10dab7dff9f98cb9185f9
parentdabba0388d05d6cbb157b8108e89e84438fcfff5
x86: vmm: Fix number of CPU detection from cpuid

Cpuid leaf 0x1, ebx, was reporting the number of logical processors from
the host OS.  We should be reporting the number of guest cores.

Similarly, I added a masking of the APIC core id to one byte, in the off
chance that would cause a problem.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/arch/x86/trap.c