From 7543e00a0767c3a5e753cd9af9e5e947e3af77bf Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Mon, 25 Nov 2019 14:16:55 +0000 Subject: [PATCH] vmm: Use new CpuManager accessor to get boot vCPUs When initialising the ACPI tables and configuring the VM use the new accessor on the CpuManager to get the number of boot vCPUs. Signed-off-by: Rob Bradford --- vmm/src/vm.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vmm/src/vm.rs b/vmm/src/vm.rs index b734fd291..77286a02c 100755 --- a/vmm/src/vm.rs +++ b/vmm/src/vm.rs @@ -512,7 +512,7 @@ impl Vm { &cmdline_cstring, ) .map_err(|_| Error::CmdLine)?; - let vcpu_count = self.config.cpus.cpu_count; + let boot_vcpus = self.cpu_manager.lock().unwrap().boot_vcpus(); #[allow(unused_mut, unused_assignments)] let mut rsdp_addr: Option = None; @@ -532,7 +532,7 @@ impl Vm { use crate::config::ConsoleOutputMode; crate::acpi::create_acpi_tables( &mem, - vcpu_count, + boot_vcpus, self.config.serial.mode != ConsoleOutputMode::Off, start_of_device_area, end_of_range, @@ -547,7 +547,7 @@ impl Vm { &mem, arch::layout::CMDLINE_START, cmdline_cstring.to_bytes().len() + 1, - vcpu_count, + boot_vcpus, Some(hdr), rsdp_addr, ) @@ -566,7 +566,7 @@ impl Vm { &mem, arch::layout::CMDLINE_START, cmdline_cstring.to_bytes().len() + 1, - vcpu_count, + boot_vcpus, None, rsdp_addr, )