mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
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:
committed by
Rob Bradford
parent
c31f5d4998
commit
8ee0a07ab1
@@ -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)?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user