mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-06 02:25:23 +00:00
0a086e6cbe
When no_smt isn't set, guest works with hyperthread enabled, but crosvm doesn't emulate processor topology cpuid at this case, so the output of guest /proc/cpuinfo and lscpu is inconsitent, and guest cpuid is wrong. This commit adds such support. If vcpu_num is >1 and is even, threads per core is 2 and cores_num is vcpu_num/2. If vcpu_num is >1 and is odd, threads per core is vcpu_num and cores_num is 1. BUG=None TEST=Check guest /proc/cpuinfo, lscpu, cpuid at different vcpu number Change-Id: I8d9aaeac3fc911ee91bf2eb0586e457aac27a185 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2548450 Tested-by: kokoro <noreply+kokoro@google.com> Commit-Queue: Dylan Reid <dgreid@chromium.org> Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |