From 06e8d1c40c2e28a79918a50a05d257cdf7877725 Mon Sep 17 00:00:00 2001 From: Muminul Islam Date: Wed, 29 May 2024 12:34:35 -0700 Subject: [PATCH] hypervisor: mshv: fix topology for Intel HW on MSHV Populating these cpuid with default values so that CLH can patch with topology information. Otherwise it gets skipped while setting some topology information. Signed-off-by: Muminul Islam --- hypervisor/src/mshv/mod.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/hypervisor/src/mshv/mod.rs b/hypervisor/src/mshv/mod.rs index 0e605b50b..d0dd5c3a3 100644 --- a/hypervisor/src/mshv/mod.rs +++ b/hypervisor/src/mshv/mod.rs @@ -374,7 +374,16 @@ impl hypervisor::Hypervisor for MshvHypervisor { /// Get the supported CpuID /// fn get_supported_cpuid(&self) -> hypervisor::Result> { - Ok(Vec::new()) + let mut cpuid = Vec::new(); + let functions: [u32; 2] = [0x1, 0xb]; + + for function in functions { + cpuid.push(CpuIdEntry { + function, + ..Default::default() + }); + } + Ok(cpuid) } /// Get maximum number of vCPUs