mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
hypervisor: vmm: mshv: Enable SMT for guests with threads_per_core > 1
Set HV_PARTITION_CREATION_FLAG_SMT_ENABLED_GUEST when the guest topology has more than one thread per core. This allows the hypervisor to schedule guest VPs correctly on SMT-enabled hosts. Without this flag, the hypervisor schedules guest VPs incorrectly, causing SMT unusable. Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
This commit is contained in:
committed by
Rob Bradford
parent
e3a2bf0870
commit
a00189cf72
@@ -221,6 +221,11 @@ impl From<&VmConfig> for hypervisor::HypervisorVmConfig {
|
||||
#[cfg(feature = "sev_snp")]
|
||||
mem_size: _value.memory.total_size(),
|
||||
nested: _value.cpus.nested,
|
||||
smt_enabled: _value
|
||||
.cpus
|
||||
.topology
|
||||
.as_ref()
|
||||
.is_some_and(|t| t.threads_per_core > 1),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user