vmm: Enforce threads_per_core to be at most two

Microsoft Hypervisor's hyperclear technology supports at most two
threads per core.

Practically all x64 CPUs nowadays only support two threads per core.
Enforce this in the common code.

Assisted-by: OpenAI:ChatGPT-5.4
[Test cases written by an LLM ]
Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
Wei Liu
2026-04-21 18:58:15 +00:00
committed by Wei Liu
parent 7c44f49293
commit d56253196b
2 changed files with 48 additions and 0 deletions

View File

@@ -66,6 +66,7 @@ mod common_parallel {
}
#[test]
#[cfg_attr(target_arch = "x86_64", should_panic)]
fn test_cpu_topology_421() {
test_cpu_topology(4, 2, 1, false);
}