crosvm/x86_64
Zhao Liu 6c3eadd1bf x86: Fix HT flag is incorrectly masked for no_smt
This is the revert of 77aa069b67.

At present, when set no_smt, if there are more than 1 logical processor
in a package for Guest, the HTT is set as 0 in CPUID. This does not
comply with the intel SDM specification.

From SDM, HTT indicates:
A value of 0 for HTT indicates there is only a single logical processor
in the package and software should assume only a single APIC ID is
reserved.

In fact, Intel has 2 differnet muti-threading capabilities:
Hyper-Threading Technology and Multi-Core Technology. But with
definition of lastest SDM, HTT flag in CPUID is not equivalent to
Hyper-Threading Technology.

no_smt means disable Hyper-Threading Technology feature so that each
core has 1 logical processor. But with Multi-Core Technology, there
still can be more than 1 logical processors in a package. In this case,
the HTT flag should be set as 1.

BUG=chromium:1304418
TEST=cargo build
TEST=set no_smt and check if there's HT flag in /proc/cpuinfo

Change-Id: Id53320407e247ba61a1ad7cedea8301e1c3469fd
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3545896
Reviewed-by: Vineeth Pillai <vineethrp@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2022-03-25 20:13:25 +00:00
..
src x86: Fix HT flag is incorrectly masked for no_smt 2022-03-25 20:13:25 +00:00
Cargo.toml acpi: vGPE: support direct SCI interrupt passthrough 2022-03-21 09:16:35 +00:00