mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: mshv: Set PROCESSORS_PER_SOCKET property for CPU topologies
On MSHV, exposing multithreaded CPU topologies requires setting the PROCESSORS_PER_SOCKET partition property so that CPUID.0xB reports correct logical processor counts and topology levels to the guest. This property must be set after all vCPUs are configured, as the hypervisor uses the complete vCPU layout to derive and report CPU topology information. Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
This commit is contained in:
@@ -2415,6 +2415,15 @@ impl Vm {
|
||||
.map_err(Error::CpuManager)?;
|
||||
}
|
||||
|
||||
#[cfg(feature = "mshv")]
|
||||
{
|
||||
self.cpu_manager
|
||||
.lock()
|
||||
.unwrap()
|
||||
.set_processors_per_socket_property()
|
||||
.ok();
|
||||
}
|
||||
|
||||
#[cfg(feature = "tdx")]
|
||||
let (sections, guid_found) = if tdx_enabled {
|
||||
self.extract_tdvf_sections()?
|
||||
|
||||
Reference in New Issue
Block a user