From bfa31f9c56142483fff7ec999549e0607ebf95af Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Thu, 1 Dec 2022 16:47:33 +0000 Subject: [PATCH] vmm: Propagate vCPU configure error correctly Signed-off-by: Rob Bradford --- vmm/src/cpu.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/vmm/src/cpu.rs b/vmm/src/cpu.rs index cc0d7a480..b581525de 100644 --- a/vmm/src/cpu.rs +++ b/vmm/src/cpu.rs @@ -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(()) }