vmm: Propagate vCPU configure error correctly

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2022-12-01 16:47:33 +00:00
parent 725e388684
commit bfa31f9c56

View File

@ -746,12 +746,10 @@ impl CpuManager {
assert!(!self.cpuid.is_empty());
#[cfg(target_arch = "x86_64")]
vcpu.configure(boot_setup, self.cpuid.clone(), self.config.kvm_hyperv)
.expect("Failed to configure vCPU");
vcpu.configure(boot_setup, self.cpuid.clone(), self.config.kvm_hyperv)?;
#[cfg(target_arch = "aarch64")]
vcpu.configure(&self.vm, boot_setup)
.expect("Failed to configure vCPU");
vcpu.configure(&self.vm, boot_setup)?;
Ok(())
}