arch, hypervisor, vmm: skip vcpu setup when using igvm and kvm

When we use igvm + kvm, we setup the regs and sregs using the cpuid
page. We still need to setup the fpu in configure_vcpu.

Co-authored-by: Keith Adler <kadler@cloudflare.com>
Signed-off-by: Keith Adler <kadler@cloudflare.com>
Co-authored-by: Alex Orozco <aorozco@google.com>
Signed-off-by: Alex Orozco <aorozco@google.com>
Signed-off-by: Ruben Hakobyan <hruben@meta.com>
This commit is contained in:
Ruben Hakobyan
2026-04-07 08:05:30 -07:00
committed by Rob Bradford
parent c31f5d4998
commit 8ee0a07ab1
4 changed files with 62 additions and 24 deletions
+10
View File
@@ -738,6 +738,14 @@ impl Vm {
let tdx_enabled = config.lock().unwrap().is_tdx_enabled();
#[cfg(feature = "sev_snp")]
let sev_snp_enabled = config.lock().unwrap().is_sev_snp_enabled();
#[cfg(feature = "igvm")]
let igvm_enabled = config
.lock()
.unwrap()
.payload
.as_ref()
.and_then(|p| p.igvm.as_ref())
.is_some();
let cpus_config = config.lock().unwrap().cpus.clone();
let cpu_manager = cpu::CpuManager::new(
@@ -755,6 +763,8 @@ impl Vm {
numa_nodes,
#[cfg(feature = "sev_snp")]
sev_snp_enabled,
#[cfg(feature = "igvm")]
igvm_enabled,
)
.map_err(Error::CpuManager)?;