vmm: CPUID level 0x0B handling
authorDan Cross <crossd@gmail.com>
Wed, 12 Apr 2017 19:40:16 +0000 (15:40 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Mon, 17 Apr 2017 19:59:17 +0000 (15:59 -0400)
commit865d378f7f039c3631e2868811db51b65edf6b07
tree8300defa92c20cf820ec134e14096a69a1d3cba8
parentb866de5095a300d5d5be30c4364607e670cd6326
vmm: CPUID level 0x0B handling

TODO: Figure out EAX (really, RAX in our world) values at SMT level.

When we get CPUID level 0x0b, reflect to userspace.  We
fake some information about the SMP topology of the machine:
basically, no hyperthreading and $n$ cores in a single
package.

We'll probably have to hook this into the ACPI tables somehow
to get the full effect; in the meantime, this seems to work.

Change-Id: I9543066e74e592d381c11bcd76e7f9e0476c7cab
Signed-off-by: Dan Cross <crossd@gmail.com>
[removed WIP tag]
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/arch/x86/trap.c
user/vmm/vmexit.c