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 <muislam@microsoft.com>
This commit is contained in:
Muminul Islam 2024-05-29 12:34:35 -07:00 committed by Liu Wei
parent b70b8dfa4c
commit 06e8d1c40c

View File

@ -374,7 +374,16 @@ impl hypervisor::Hypervisor for MshvHypervisor {
/// Get the supported CpuID
///
fn get_supported_cpuid(&self) -> hypervisor::Result<Vec<CpuIdEntry>> {
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